Automatically merging graphical programs

ABSTRACT

System and method for merging differences between graphical programs. Information is received regarding matches and differences, e.g., in hardware, software, configuration, and/or connectivity, between first and second graphical programs, each comprising respective pluralities of interconnected nodes. The information is analyzed to merge differences between the first and second graphical programs, e.g., for each difference: removing all non-common nodes and connections thereto in the second sub-graph from the second graphical program, adding all common nodes and connections thereto in the first sub-graph to the second graphical program, determining all edges in the first sub-graph that connect common nodes to non-common nodes; and for each determined edge, adding to the second graphical program an edge that connects a corresponding common node in the second sub-graph with a corresponding non-common node added from the first sub-graph. A merged graphical program is displayed on a display, e.g., graphically indicating the merged matches and/or differences.

PRIORITY DATA

This application is a continuation of U.S. patent application Ser. No.11/330,724 titled “Merging Graphical Programs” and filed on Jan. 12,2006, now U.S. Pat. No. 7,703,027 whose inventors were Ray Hsu, MohammedKamran Shah, Duncan Hudson, Yixin Guo and Jonathan P. Fournie, whichclaims benefit of priority of U.S. Provisional Application Ser. No.60/643,615 titled “Merging Graphical Programs”, filed Jan. 13, 2005,whose inventors were Mohammed Kamran Shah and Duncan Hudson, and whichare all hereby incorporated by reference in their entirety as thoughfully and completely set forth herein.

FIELD OF THE INVENTION

The present invention relates to the field of graphical programming, andmore particularly to a system and method for d merging graphicalprograms.

DESCRIPTION OF THE RELATED ART

Traditionally, high level text-based programming languages have beenused by programmers in writing application programs. Many different highlevel text-based programming languages exist, including BASIC, C, C++,Java, FORTRAN, Pascal, COBOL, ADA, APL, etc. Programs written in thesehigh level text-based languages are translated to the machine languagelevel by translators known as compilers or interpreters. The high leveltext-based programming languages in this level, as well as the assemblylanguage level, are referred to herein as text-based programmingenvironments.

Increasingly, computers are required to be used and programmed by thosewho are not highly trained in computer programming techniques. Whentraditional text-based programming environments are used, the user'sprogramming skills and ability to interact with the computer systemoften become a limiting factor in the achievement of optimal utilizationof the computer system.

There are numerous subtle complexities which a user must master beforehe can efficiently program a computer system in a text-basedenvironment. The task of programming a computer system to model orimplement a process often is further complicated by the fact that asequence of mathematical formulas, steps or other procedures customarilyused to conceptually model a process often does not closely correspondto the traditional text-based programming techniques used to program acomputer system to model such a process. In other words, the requirementthat a user program in a text-based programming environment places alevel of abstraction between the user's conceptualization of thesolution and the implementation of a method that accomplishes thissolution in a computer program. Thus, a user often must substantiallymaster different skills in order to both conceptualize a problem orprocess and then to program a computer to implement a solution to theproblem or process. Since a user often is not fully proficient intechniques for programming a computer system in a text-based environmentto implement his solution, the efficiency with which the computer systemcan be utilized often is reduced.

To overcome the above shortcomings, various graphical programmingenvironments now exist which allow a user to construct a graphicalprogram or graphical diagram, also referred to as a block diagram. U.S.Pat. Nos. 4,901,221; 4,914,568; 5,291,587; 5,301,301; and 5,301,336;among others, to Kodosky et al disclose a graphical programmingenvironment which enables a user to easily and intuitively create agraphical program. Graphical programming environments such as thatdisclosed in Kodosky et al can be considered a higher and more intuitiveway in which to interact with a computer. A graphically basedprogramming environment can be represented at a level above text-basedhigh level programming languages such as C, Basic, Java, etc.

A user may assemble a graphical program by selecting various icons ornodes which represent desired functionality, and then connecting thenodes together to create the program. The nodes or icons may beconnected by lines representing data flow between the nodes, controlflow, or execution flow. Thus the block diagram may include a pluralityof interconnected icons such that the diagram created graphicallydisplays a procedure or method for accomplishing a certain result, suchas manipulating one or more input variables and/or producing one or moreoutput variables. In response to the user constructing a diagram orgraphical program using the block diagram editor, data structures and/orprogram instructions may be automatically constructed which characterizean execution procedure that corresponds to the displayed procedure. Thegraphical program may be compiled or interpreted by a computer.

A graphical program may have a graphical user interface. For example, increating a graphical program, a user may create a front panel or userinterface panel. The front panel may include various graphical userinterface elements or front panel objects, such as user interfacecontrols and/or indicators, that represent or display the respectiveinput and output that will be used by the graphical program, and mayinclude other icons which represent devices being controlled.

Thus, graphical programming has become a powerful tool available toprogrammers. Graphical programming environments such as the NationalInstruments LabVIEW product have become very popular. Tools such asLabVIEW have greatly increased the productivity of programmers, andincreasing numbers of programmers are using graphical programmingenvironments to develop their software applications. In particular,graphical programming tools are being used for test and measurement,data acquisition, process control, man machine interface (MMI),supervisory control and data acquisition (SCADA) applications, modeling,simulation, image processing/machine vision applications, and motioncontrol, among others.

The development and maintenance of software systems often involvesanalysis or comparison of different versions of a software program, orof similar software programs. For example, many program developmentenvironments support some type of “difference” functionality, where toprograms are compared and their differences determined and presented toa user. This functionality is relatively straightforward to implement intext-based programming systems, primarily because of the linear natureof text. Such functionality in graphical programming systems issubstantially more challenging to implement, substantially due to thespatial nature of graphical program layouts. Additionally, the presenceof a sub-VIs, i.e., graphical sub-programs, further complicates suchfunctionality, effectively adding an additional dimension to the programspace. The first commercial graphical differencing tool was provided byNational Instruments Corporation in the LabVIEW graphical programmingdevelopment environment, v5.0. Methodologies used in this product aredescribed in U.S. Pat. Nos. 5,974,254 and 6,138,270.

A related functionality is program merging, in which the differencesbetween two programs are reconciled in one or both programs, or in athird program. In this way, different versions of a program may bemerged to update the program, e.g., for version control etc. There arenumerous well-known solutions for text-based merging. Text-based mergeis generally a straightforward problem, since differences are expressedin a two-dimensional fashion (line, column) that represents a sequentialblock of text. For example, (line 3, column 5) through (line 5, column55) in the first text file is different than (line 4, column 9) through(line 7, column 47) of the second file. Merging the difference from thefirst file to the second file simply involves replacing the text blockthat represents the difference in the first file with the text blockrepresenting the corresponding difference in the second file.

However, there are no known prior art technologies that provide thismerge functionality for graphical programs. Graphical merging issignificantly more challenging than text-based merging, since graphicaldifferences are represented by discontinuous sets of connected objects.Furthermore, as noted above, graphical difference involves athree-dimensional problem space since nested graphs (use of sub-VIs,i.e., graphical sub-programs) are present in the most general case.

Thus, systems and methods for performing graphical program mergeoperations is desired. Additionally, intelligent placement and graphicallayout of merged program elements to preserve the readability of mergedgraphical programs is desired.

SUMMARY OF THE INVENTION

Embodiments of a system and method for merging graphical programs aredescribed. Information regarding a first graphical program may bereceived. Information regarding a second graphical program may also bereceived. A graphical program may comprise a plurality of nodesrepresenting components in the represented system, and optionallyinterconnections representing physical, logical, and/or data couplingbetween the components or resources. Note that the first and secondgraphical programs may be of any type, e.g., the first system and thesecond system may each comprise one or more of: an industrial automationsystem, a process control system, and a test and measurement system,among others. In a preferred embodiment, at least one of the graphicalprograms comprises a measurement system program.

In various embodiments, the information regarding the first and secondgraphical programs may be any type of information related to orcharacterizing the graphical programs. For example, in some embodimentsthe information may include the graphical programs themselves. In otherembodiments, the information regarding a graphical program may includeone or more of: an abstract representation of the graphical program,e.g., a data structure or description specifying the plurality of nodes,and optionally, interconnections, component attributes, e.g.,identification, sub-components, configuration data, version information,descriptions, deployment, and so forth. Thus, the information regardingeach graphical program may include one or more of: the graphicalprogram, a graph of the graphical program, a description of thegraphical program, and a data structure specifying the graphicalprogram. The information for each graphical program may also includeinformation related to hardware associated with the graphical programs,such as, for example, execution targets for nodes in the programs, andmay also include information related to the connectivity or associationsbetween the components of the graphical programs.

Henceforth, in this document the components or resources comprised in orrepresented in the graphical programs may be referred to by the term“component”, although it should be noted that as used herein, componentmay mean any or all of a component or group of components, e.g., anassociated device or group of devices, a software component, program, orgroup of programs, data (e.g., configuration data), or any other aspectof a graphical program or graphical program element.

The received information may be analyzed to determine differencesbetween the first and second graphical programs. The determination ofthe differences between the first and second graphical programs may beperformed in a variety of different manners. In some embodiments, theanalyzing may include creating one or more data structures which includeinformation regarding the first plurality of nodes in the firstgraphical program and the second plurality of nodes in the secondgraphical program, where determining differences includes comparing theone or more data structures to determine the differences. For example,in one embodiment, the one or more data structures may each comprisedirected graphs including a plurality of vertices connected by edges,where each of the vertices represents one of the nodes in a respectiveone of the first and second graphical programs. The directed graphs maythen be analyzed to determine the differences, e.g., the graphicalprograms, or representations thereof, may be traversed or “walked”, toenumerate their respectively components and connections. For example, ifthe graphical programs are represented by respective graphs, each graphmay be traversed, where each node and connection (if any) is recorded.The resulting lists may then be compared to determine the differences.Of course, depending upon the type and form of the received information,any other type of comparison may be made as appropriate to determine thedifferences.

In one embodiment, the differences and/or matches may be determined inaccordance with specified criteria or guidelines. In other words,analyzing the first and second information to determine differencesand/or matches between the graphical programs may be performed inaccordance with specified difference and/or match criteria, such as, forexample, difference/match tolerance levels, category or type, cost, andperformance, among others. In some embodiments, the criteria may bespecified by the user. Thus, the method may include receiving user inputspecifying the difference and/or match criteria, e.g., via a graphicaluser interface (GUI).

Thus, in some embodiments, the graphical programs may be merged. Inother words, the determined matches and differences may be analyzed tomerge the first and second graphical programs, thereby generating amerged graphical program, representing a “merged” system, e.g.,comprising an at least partial union (in the set-theoretic sense) of therespective components of the first and second graphical programs. Insome embodiments, the merged graphical program graphically maygraphically indicate the differences between the first and secondgraphical programs.

In some embodiments, merging the first graphical program and the secondgraphical program may include analyzing and merging one or more of:matches and differences between program elements, e.g., nodes and/orconnections, comprised in the first and second graphical programs,matches and differences between configuration data comprised in thefirst and second graphical programs, and matches and differences betweenhardware (e.g., execution target or deployment hardware) associated withthe graphical programs, among others.

In preferred embodiments, each graphical program may be referred to asor represented by a respective graph, and each determined difference maybe represented by a respective pair of sub-graphs (e.g., graphicalsub-programs), e.g., a first sub-graph, referred to below as sub-graphA, including one or more nodes and zero or more edges in the first graph(i.e., the first graphical program), and a respective second sub-graph,referred to below as sub-graph B, comprising one or more nodes and zeroor more edges in the second graph (i.e., the second graphical program).

In other words, each difference between the two graphical programs mayinclude or be represented by a respective sub-graph A in the firstgraphical program and a respective sub-graph B in the second graphicalprogram, where sub-graphs A and B are different. Sub-graphs A and B maythus comprise or represent corresponding differences between the firstand second graphical program, and may be determined based on anchorelements, e.g., anchor nodes, where anchor nodes are program nodes inthe first graphical program that have an exact match in the secondgraphical program (or vice versa), e.g., as determined by the matchingalgorithm or heuristic used by the graphical differencing system. Notethat the techniques described herein are broadly applicable to otherprogram elements, as well, e.g., information or code associated withnodes, connections, or any other aspects of the program. Thus, dependingon the difference/match criteria, embodiments of the approach describedmay utilize other types of anchor elements than nodes, or, consideredanother way, the graph nodes may represent other aspects of thegraphical program in addition to graphical program nodes.

Thus, in preferred embodiments, the differences between the graphicalprograms may comprise a collection of sub-graph A/B pairs. Thedescription below is specifically directed to merging the difference insub-graph A from the first graphical program into sub-graph B from thesecond graphical program, although it should be noted that the sameprocess can be used to merge sub-graph B into sub-graph A. Thus, in oneembodiment, the final merged graphical program may include all themerged sub-graphs, in addition to the anchor nodes. Of course, as notedabove, in other embodiments, two merged graphical programs may begenerated that collectively include all or part of the mergedsub-graphs, but which may differ as to which graphical program includeswhich merged sub-graphs. Note that while the operations described hereinrefer to the first and second programs, it should be noted that if theoriginal graphical programs are to be preserved, the operations may beperformed on copies of the original graphical programs. In someembodiments, the merge process may operate as follows:

Information regarding differences and matches between first and secondgraphical programs may be received, e.g., from a graphical differencingprocess. While in various embodiments, this information describing orspecifying the differences may take any of a variety of forms, inpreferred embodiments, the information comprises a set of sub-graphs (ora specification or description thereof), where, as described above, eachdifference between the two graphical programs has or is described by anassociated pair of sub-graphs, A and B. Note that in some cases, e.g.,when one graphical program has an element that is omitted from theother, one of the sub-graphs may be empty, i.e., may be a nullsub-graph. Once the information regarding the matches and differences isreceived, the method may process or analyze each difference, asdescribed below.

First, for a current difference, all non-anchor nodes in sub-graph B andedges connected to these nodes may be deleted from the second graphicalprogram. Then, all non-anchor nodes from sub-graph A and edges connectedto these nodes may be added to the second graphical program. In variousembodiments, program elements, e.g., nodes and edges (wires) may beadded to the graphical program in different ways. For example, due tothe graphical nature of the programs, space (e.g., in the block diagram)may need to be provided for the added elements. In one approach, boundscircumscribing the program elements, e.g., bounding boxes, convex hulls,or functional equivalents thereof, may be determined, where the boundsdefine a space wherein the elements may be placed, e.g., in a graphicalprogram. In one embodiment, the bounds may comprise rectangles, althoughother shapes may be used as desired, e.g., convex hulls or variantsthereof, closed curves, aggregations of rectangles and/or other shapes,and so forth.

Thus, in one embodiment, a bounding rectangle for all non-anchor nodesin sub-graph A may be determined, referred to as R1. Similarly, abounding rectangle for all non-anchor nodes in sub-graph B may bedetermined, where the resulting rectangle may be referred to as R2. Athird rectangle, referred to as R3, may be determined based on thedifferences between R2 and R3. For example, if the area of R1 is greaterthan R2, space in the second graphical program may be created (or added)by increasing the coordinates (x,y) of all objects (e.g., programelements) to the right and below R2 by the respective differences inwidth and height of R1 and R2.

If the area of R1 is less than R2, then space in the second graphicalprogram may be reduced by decreasing the coordinates (x,y) of allobjects to the right and below R2 by the respective differences in widthand height of R1 and R2.

In other words, an offset (increase or reduction) may be determined thatreflects the difference in size of R1 and R2. The modified (increased orreduced) space corresponds to R3. Thus, the new rectangle R3 may bedetermined by modifying the width and height of R1 by the determinedoffset (size difference) of R2. In some embodiments, the non-anchornodes of 704 may thus be placed into R3 with their relative positionspreserved, where R3 represents or specifies the “insertion space” forthe merged sub-graph in the second graphical program.

Then, all edges in sub-graph A that connect anchor nodes to non-anchornodes may be enumerated or determined. Said another way, the method maydetermine all the edges or wires that connect the nodes or elementscommon to both programs (the anchor nodes) to the non-anchor nodes insub-graph A. For each edge enumerated or determined, a correspondingedge that connects a corresponding anchor node in sub-graph B with acorresponding non-anchor node merged from sub-graph A may be added tothe second graphical program. In other words, the added nodes may beconnected to the non-anchor nodes of the second program, therebyintegrating the merged sub-graph A into the second graphical program.

If there are further differences, the method may repeat, proceeding asdescribed above, with the next difference as current. If there are nomore differences, the method may terminate.

In some embodiments, the merged graphical program may be generated bymodifying the first or second graphical program, i.e., adding any“different” nodes and/or connections to the graphical program, where theaffiliation of each of the nodes and/or connections may be indicated,e.g., the first or second graphical program. In some embodiments, atemporary third graphical program may be produced and used to update ormodify the first or second graphical program. Alternatively, the mergedgraphical program may be generated as a new graphical program. In someembodiments, the method may include receiving user input specifying thegeneration of the merged graphical program. For example, the user mayspecify that the first graphical program is to be modified to generatethe merged program, or that the merged graphical program be separate anddistinct from the first and second graphical programs.

The merged graphical program may then be displayed on a display device,e.g., a computer monitor, printer, etc. There are numerous ways in whichthe merged graphical program may be displayed, any of which may be usedas desired. For example, in one embodiment, the merged graphical programmay be displayed where nodes and/or connections common to both graphicalprograms, and/or those exclusive to each graphical program may begraphically displayed in such as way as to distinguish between them,e.g., via highlighting, color, line-style, labels, animated boundaries,etc. In other words, nodes and/or connections common to both graphicalprograms, and/or those exclusive to each graphical program may begraphically displayed in such as way as to distinguish between them.Thus, in some embodiments, the graphical programs may be merged togenerate a merged graphical program, and the results displayed.

In some embodiments, the merged graphical program may be indicatedtextually, e.g., as lists or tables of components and optionally, theirconnectivity. For example, names of components (and optionally,connectivity) may be grouped according to their graphical programaffiliation, including a “common” group comprising those common to bothgraphical programs. Any other means of displaying the merged graphicalprogram are also contemplated, including, for example, combinations oftextual and graphical representations. For example, displaying themerged graphical program may also include graphically indicating thematches and differences between the first and second graphical programsin the merged graphical program, and/or displaying a textual descriptionof matches and differences between the first and second graphicalprograms. In one embodiment, graphically indicating the matches anddifferences between the first and second graphical programs in themerged graphical program may include highlighting the differences (ormatches) between the first and second graphical programs in the mergedgraphical program.

The merged graphical program may be used for any of a variety ofpurposes. For example, in one embodiment, the first graphical programmay comprise a desired program specification or functionality, and thesecond graphical program may comprise a program that the user may wishto modify to bring in accordance with the specification. In someembodiments, the determined differences and/or matches between the twoprograms, and represented in the merged graphical program, may be usedto place an order for any components, e.g., graphical program nodes orelements, needed to bring the second graphical program into accordancewith the specification, i.e., the first graphical program, and/or toacquire missing components directly, e.g., via downloading from a serversystem. Thus, the method may further include providing means forenabling the user to acquire needed but missing components for thesecond graphical program.

For example, in one embodiment, software executing on a client computersystem, e.g. the users computer system, and/or software executing on aserver computer, e.g. coupled to the client computer, may analyze thedetermined differences and may automatically initiate acquisition and/orpurchase of the missing (one or more) components. In one embodiment, thesoftware may automatically order the components without user input,e.g., via the network (e.g., the Internet), for example, if the user'sbilling or payment information (e.g., credit card number, credit accountnumber, etc.) is already stored or available to the software. In otherwords, the system may comprise an e-commerce system that automaticallyorders and purchases the needed components based on the determineddifferences. In other embodiments, the user may be presented with a GUI,e.g., displayed on the client system and provided by the server and/orthe client system, prompting the user for input regarding completion ofthe second graphical program. For example, the GUI may display themerged graphical program, e.g., highlighting those components that aremissing in the second graphical program, and may prompt the user with a“Complete the graphical program?” message or equivalent. In response toa positive answer from the user, a search for and/or order of themissing components may then be performed. For example, one or morequotes for each missing component may be presented to the user,including, for example, cost, vendor, delivery times, and/or any otherinformation useful for making a purchase decision, where the quotes maybe retrieved from a database, via a network search engine, or any othersource of quote information. As another example, the user may click oneach of the missing components in the diagram, thereby invokingrespective options related to that component, such as, for example,searching for similar components, ordering the component, etc. The GUImay also facilitate user entry or specification of payment informationfor acquiring the components. Note that in some cases, one or more ofthe needed components may be free, e.g., software components availablefor download from a server, etc. Note that in embodiments where thedetermined differences and matches include hardware associated with thegraphical programs, the components searched for and quoted (andoptionally ordered or otherwise acquired) may include hardwarecomponents.

In other embodiments, at least some user input may be required toacquire the components. For example, in one embodiment, the clientcomputer system may contact a server computer system to acquire thedesired components. In one embodiment, a GUI may be presented to theuser on a display device of the client computer system, where the GUImay be provided by the client computer system and/or by the server. Inone embodiment, the user may specify which components are needed,although in other embodiments, the GUI may indicate to the user whichcomponents (or component types) are needed by the second graphicalprogram to bring it into compliance with the specification, i.e., thefirst graphical program.

Thus, the GUI may present user-selectable options for acquiring themissing graphical program components or elements. As one example, theGUI may simply provide a list of the needed components (possiblynumerous versions of each) and contact information for sources orvendors of the components, e.g., names, addresses, telephone numbers,websites or URLs, and so forth. As another example, the GUI may presentvarious ordering options and/or means for acquiring the components,including, for example, user-selectable links for placing orders over anetwork, e.g., the Internet, or for downloading software (including, forexample, hardware configuration programs for programmable hardwareelements) and/or data, e.g., configuration data. In some embodiments,the GUI may present information to help the user select components, suchas, for example, cost, vendor, manufacturer, technical specifications,order fulfillment times, and so forth. The GUI may also facilitate userentry of payment, billing, or account information needed to purchase thecomponents, as mentioned above.

In some embodiments, the method (e.g., the server) may automaticallydetermine possible sources for candidate components by accessing aninternal or external database, or by searching a network, e.g., theInternet, where, as noted above, specified selection or prioritycriteria may be used to guide the search.

Thus, the method may be operable to determine missing components, orderand purchase the components, and deploy the components to the secondgraphical program, e.g., in order to bring the second graphical programinto compliance with the first graphical program. Thus, one or more ofthe missing components may be acquired, e.g., via download from theserver (or a different server) and/or via more physical means, such asdelivery via any of various delivery or postal means.

BRIEF DESCRIPTION OF THE DRAWINGS

A better understanding of the present invention can be obtained when thefollowing detailed description of the preferred embodiment is consideredin conjunction with the following drawings, in which:

FIG. 1A illustrates a computer system operable to implement variousembodiments of the present invention;

FIG. 1B illustrates a network system comprising two or more computersystems that may implement an embodiment of the present invention;

FIG. 2A illustrates an instrumentation control system according to oneembodiment of the invention;

FIG. 2B illustrates an industrial automation system according to oneembodiment of the invention;

FIG. 3 is an exemplary block diagram of the computer systems of FIGS.1A, 1B, 2A and 2B;

FIG. 4 illustrates an example graphical program, according to oneembodiment;

FIG. 5 is a flowchart diagram illustrating one embodiment of a methodfor merging graphical programs;

FIG. 6 is a flowchart diagram illustrating one embodiment of thedifferencing process of the method of FIG. 5;

FIG. 7 is a flowchart diagram illustrating one embodiment of the mergeprocess of the method of FIG. 5;

FIGS. 8A-8G are exemplary screenshots illustrating some embodiments ofthe method of FIG. 5; and

FIGS. 9A and 9B are exemplary screenshots of differencing results,according to one embodiment.

While the invention is susceptible to various modifications andalternative forms, specific embodiments thereof are shown by way ofexample in the drawings and are herein described in detail. It should beunderstood, however, that the drawings and detailed description theretoare not intended to limit the invention to the particular formdisclosed, but on the contrary, the intention is to cover allmodifications, equivalents and alternatives falling within the spiritand scope of the present invention as defined by the appended claims.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Incorporation byReference

The following references are hereby incorporated by reference in theirentirety as though fully and completely set forth herein:

U.S. Provisional Application Ser. No. 60/643,615 titled “MergingGraphical Programs”, filed Jan. 13, 2005.

U.S. patent application Ser. No. 08/870,262 titled “Method for DetectingDifferences Between Graphical Programs,” filed on Jun. 6, 1999, andwhich issued as U.S. Pat. No. 5,974,254 on Oct. 26, 1999.

U.S. patent application Ser. No. 09/339,340 titled “System, Method andMemory Medium for Detecting Differences Between Graphical Programs,”filed on Oct. 24, 2000, and which issued as U.S. Pat. No. 6,138,270 onOct. 24, 2000.

U.S. Pat. No. 4,914,568 titled “Graphical System for Modeling a Processand Associated Method,” issued on Apr. 3, 1990.

U.S. Pat. No. 5,481,741 titled “Method and Apparatus for ProvidingAttribute Nodes in a Graphical Data Flow Environment”, filed Sep. 22,1993.

U.S. Pat. No. 6,173,438 titled “Embedded Graphical Programming System”filed Aug. 18, 1997.

U.S. Pat. No. 6,219,628 titled “System and Method for Configuring anInstrument to Perform Measurement Functions Utilizing Conversion ofGraphical Programs into Hardware Implementations,” filed Aug. 18, 1997.

U.S. Pat. No. 5,990,906 titled “Undo Feature for a Graphical ProgrammingSystem,” filed Aug. 19, 1997.

U.S. Pat. No. 7,210,117, published as U.S. Patent ApplicationPublication No. 20010020291 (Ser. No. 09/745,023) titled “System andMethod for Programmatically Generating a Graphical Program in Responseto Program Information,” filed Dec. 20, 2000.

U.S. Pat. No. 7,620,897, filed as U.S. patent application Ser. No.10/338,533 titled “Network-Based System which Provides a Database ofMeasurement Solutions”, filed Jan. 8, 2003.

U.S. Pat. No. 7,050,923, published as U.S. Patent ApplicationPublication 20030036874 (Ser. No. 10/101,512) titled “Network-basedSystem for Configuring a Measurement System using ConfigurationInformation Generated based on a User Specification”, filed Mar. 19,2002.

U.S. Pat. No. 7,013,232, published as U.S. Patent ApplicationPublication 20030036876 (Ser. No. 10/120,257) titled “Network-basedSystem for Configuring a Measurement System using ConfigurationInformation Generated based on a User Specification”, filed Apr. 10,2002.

U.S. Pat. No. 6,889,172, filed as U.S. patent application Ser. No.10/101,508 titled “Network-based System for Configuring a MeasurementSystem using Software Programs Generated based on a User Specification”,filed Mar. 19, 2002.

U.S. Pat. No. 7,016,811, filed as U.S. patent application Ser. No.10/101,507 titled “Network-based System for Configuring a ProgrammableHardware Element in a Measurement System using Hardware ConfigurationPrograms Generated Based on a User Specification”, filed Mar. 19, 2002.

TERMS

The following is a glossary of terms used in the present application:

Memory Medium—Any of various types of memory devices or storage devices.The term “memory medium” is intended to include an installation medium,e.g., a CD-ROM, floppy disks 104, or tape device; a computer systemmemory or random access memory such as DRAM, DDR RAM, SRAM, EDO RAM,Rambus RAM, etc.; or a non-volatile memory such as a magnetic media,e.g., a hard drive, or optical storage. The memory medium may compriseother types of memory as well, or combinations thereof. In addition, thememory medium may be located in a first computer in which the programsare executed, or may be located in a second different computer whichconnects to the first computer over a network, such as the Internet. Inthe latter instance, the second computer may provide programinstructions to the first computer for execution. The term “memorymedium” may include two or more memory mediums which may reside indifferent locations, e.g., in different computers that are connectedover a network.

Carrier Medium—a memory medium as described above, as well as signalssuch as electrical, electromagnetic, or digital signals, conveyed via acommunication medium such as a bus, network and/or a wireless link.

Programmable Hardware Element—includes various types of programmablehardware, reconfigurable hardware, programmable logic, orfield-programmable devices (FPDs), such as one or more FPGAs (FieldProgrammable Gate Arrays), or one or more PLDs (Programmable LogicDevices), such as one or more Simple PLDs (SPLDs) or one or more ComplexPLDs (CPLDs), or other types of programmable hardware. A programmablehardware element may also be referred to as “reconfigurable logic”.

Medium—includes one or more of a memory medium, carrier medium, and/orprogrammable hardware element; encompasses various types of mediums thatcan either store program instructions/data structures or can beconfigured with a hardware configuration program. For example, a mediumthat is “configured to perform a function or implement a softwareobject” may be 1) a memory medium or carrier medium that stores programinstructions, such that the program instructions are executable by aprocessor to perform the function or implement the software object; 2) amedium carrying signals that are involved with performing the functionor implementing the software object; and/or 3) a programmable hardwareelement configured with a hardware configuration program to perform thefunction or implement the software object.

Configuration Diagram—a graphical representation of a system, includinga plurality of icons or nodes that represent hardware and/or softwarecomponents or resources of the system, optionally interconnected,corresponding to connections and/or associations between the componentsor resources, i.e., physical and/or data coupling between the componentsor resources.

Program—the term “program” is intended to have the full breadth of itsordinary meaning The term “program” includes 1) a software program whichmay be stored in a memory and is executable by a processor or 2) ahardware configuration program useable for configuring a programmablehardware element.

Software Program—the term “software program” is intended to have thefull breadth of its ordinary meaning, and includes any type of programinstructions, code, script and/or data, or combinations thereof, thatmay be stored in a memory medium and executed by a processor. Exemplarysoftware programs include programs written in text-based programminglanguages, such as C, C++, Pascal, Fortran, Cobol, Java, assemblylanguage, etc.; graphical programs (programs written in graphicalprogramming languages); assembly language programs; programs that havebeen compiled to machine language; scripts; and other types ofexecutable software. A software program may comprise two or moresoftware programs that interoperate in some manner.

Hardware Configuration Program—a program, e.g., a netlist or bit file,that can be used to program or configure a programmable hardwareelement.

Graphical Program—A program comprising a plurality of interconnectednodes or icons, wherein the plurality of interconnected nodes or iconsvisually indicate functionality of the program.

The following provides examples of various aspects of graphicalprograms. The following examples and discussion are not intended tolimit the above definition of graphical program, but rather provideexamples of what the term “graphical program” encompasses:

The nodes in a graphical program may be connected in one or more of adata flow, control flow, and/or execution flow format. The nodes mayalso be connected in a “signal flow” format, which is a subset of dataflow.

Exemplary graphical program development environments which may be usedto create graphical programs include LabVIEW, DasyLab, DiaDem andMatrixx/SystemBuild from National Instruments Corporation, Simulink fromthe MathWorks, VEE from Agilent, WiT from Coreco, Vision Program Managerfrom PPT Vision, SoftWIRE from Measurement Computing, Sanscript fromNorthwoods Software, Khoros from Khoral Research, SnapMaster from HEMData, VisSim from Visual Solutions, ObjectBench by SES (Scientific andEngineering Software), and VisiDAQ from Advantech, among others.

The term “graphical program” includes models or block diagrams createdin graphical modeling environments, wherein the model or block diagramcomprises interconnected nodes or icons that visually indicate operationof the model or block diagram; exemplary graphical modeling environmentsinclude Simulink, SystemBuild, VisSim, Hypersignal Block Diagram, etc.

A graphical program may be represented in the memory of the computersystem as data structures and/or program instructions. The graphicalprogram, e.g., these data structures and/or program instructions, may becompiled or interpreted to produce machine language that accomplishesthe desired method or process as shown in the graphical program.

Input data to a graphical program may be received from any of varioussources, such as from a device, unit under test, a process beingmeasured or controlled, another computer program, a database, or from afile. Also, a user may input data to a graphical program or virtualinstrument using a graphical user interface, e.g., a front panel.

A graphical program may optionally have a GUI associated with thegraphical program. In this case, the plurality of interconnected nodesare often referred to as the block diagram portion of the graphicalprogram.

Node—In the context of a graphical program, an element that may beincluded in a graphical program. A node may have an associated icon thatrepresents the node in the graphical program, as well as underlying codeor data that implements functionality of the node. Exemplary nodesinclude function nodes, terminal nodes, structure nodes, etc. Nodes maybe connected together in a graphical program by connection icons orwires.

Data Flow Graphical Program (or Data Flow Diagram)—A graphical programor diagram comprising a plurality of interconnected nodes, wherein theconnections between the nodes indicate that data produced by one node isused by another node.

Graphical User Interface—this term is intended to have the full breadthof its ordinary meaning The term “Graphical User Interface” is oftenabbreviated to “GUI”. A GUI may comprise only one or more input GUIelements, only one or more output GUI elements, or both input and outputGUI elements.

The following provides examples of various aspects of GUIs. Thefollowing examples and discussion are not intended to limit the ordinarymeaning of GUI, but rather provide examples of what the term “graphicaluser interface” encompasses:

A GUI may comprise a single window having one or more GUI Elements, ormay comprise a plurality of individual GUI Elements (or individualwindows each having one or more GUI Elements), wherein the individualGUI Elements or windows may optionally be tiled together.

A GUI may be associated with a graphical program. In this instance,various mechanisms may be used to connect GUI Elements in the GUI withnodes in the graphical program. For example, when Input Controls andOutput Indicators are created in the GUI, corresponding nodes (e.g.,terminals) may be automatically created in the graphical program orblock diagram. Alternatively, the user can place terminal nodes in theblock diagram which may cause the display of corresponding GUI Elementsfront panel objects in the GUI, either at edit time or later at runtime. As another example, the GUI may comprise GUI Elements embedded inthe block diagram portion of the graphical program.

Front Panel—A Graphical User Interface that includes input controls andoutput indicators, and which enables a user to interactively control ormanipulate the input being provided to a program, and view output of theprogram, while the program is executing.

A front panel is a type of GUI. A front panel may be associated with agraphical program as described above.

In an instrumentation application, the front panel can be analogized tothe front panel of an instrument. In an industrial automationapplication the front panel can be analogized to the MMI (Man MachineInterface) of a device. The user may adjust the controls on the frontpanel to affect the input and view the output on the respectiveindicators.

Graphical User Interface Element—an element of a graphical userinterface, such as for providing input or displaying output. Exemplarygraphical user interface elements comprise input controls and outputindicators

Input Control—a graphical user interface element for providing userinput to a program. Exemplary input controls comprise dials, knobs,sliders, input text boxes, etc.

Output Indicator—a graphical user interface element for displayingoutput from a program. Exemplary output indicators include charts,graphs, gauges, output text boxes, numeric displays, etc. An outputindicator is sometimes referred to as an “output control”.

Computer System—any of various types of computing or processing systems,including a personal computer system (PC), mainframe computer system,workstation, network appliance, Internet appliance, personal digitalassistant (PDA), television system, grid computing system, or otherdevice or combinations of devices. In general, the term “computersystem” can be broadly defined to encompass any device (or combinationof devices) having at least one processor that executes instructionsfrom a memory medium.

Measurement Device—includes instruments, data acquisition devices, smartsensors, and any of various types of devices that are operable toacquire and/or store data. A measurement device may also optionally befurther operable to analyze or process the acquired or stored data.Examples of a measurement device include an instrument, such as atraditional stand-alone “box” instrument, a computer-based instrument(instrument on a card) or external instrument, a data acquisition card,a device external to a computer that operates similarly to a dataacquisition card, a smart sensor, one or more DAQ or measurement cardsor modules in a chassis, an image acquisition device, such as an imageacquisition (or machine vision) card (also called a video capture board)or smart camera, a motion control device, a robot having machine vision,and other similar types of devices. Exemplary “stand-alone” instrumentsinclude oscilloscopes, multimeters, signal analyzers, arbitrary waveformgenerators, spectroscopes, and similar measurement, test, or automationinstruments.

A measurement device may be further operable to perform controlfunctions, e.g., in response to analysis of the acquired or stored data.For example, the measurement device may send a control signal to anexternal system, such as a motion control system or to a sensor, inresponse to particular data. A measurement device may also be operableto perform automation functions, i.e., may receive and analyze data, andissue automation control signals in response.

FIG. 1A—Computer System

FIG. 1A illustrates a computer system 82 operable to execute softwareprograms for determining and/or merging differences betweenconfiguration diagrams. Various embodiments of methods for determiningand merging differences between configuration diagrams are describedbelow.

As shown in FIG. 1A, the computer system 82 may include a display deviceoperable to display graphical programs. The display device may also beoperable to display a graphical user interface for user interaction withsoftware and/or hardware implementing embodiments of the presentinvention. The graphical user interface may comprise any type ofgraphical user interface, e.g., depending on the computing platform.

The computer system 82 may include a memory medium(s) on which one ormore computer programs or software components according to oneembodiment of the present invention may be stored. For example, thememory medium may store one or more programs, e.g., graphical programs,which are executable to perform the methods described herein. Also, thememory medium may store a programming development environmentapplication used to create and/or execute such programs, e.g., theLabVIEW graphical programming development environment provided byNational Instruments Corporation. The memory medium may also storeoperating system software, as well as other software for operation ofthe computer system. Various embodiments further include receiving orstoring instructions and/or data implemented in accordance with theforegoing description upon a carrier medium.

FIG. 1B—Computer Network

FIG. 1B illustrates a system including a first computer system 82 thatis coupled to a second computer system 90. The computer system 82 may beconnected through a network 84 (or a computer bus) to the secondcomputer system 90. The computer systems 82 and 90 may each be any ofvarious types, as desired. The network 84 can also be any of varioustypes, including a LAN (local area network), WAN (wide area network),the Internet, or an Intranet, among others.

In some embodiments, the computer systems 82 and 90 may implement and/orexecute software programs in a cooperative or distributed manner. Forexample, in embodiments that utilize graphical programmingmethodologies, the computer systems 82 and 90 may execute a graphicalprogram in a distributed fashion. For example, computer 82 may execute afirst portion of the block diagram of a graphical program and computersystem 90 may execute a second portion of the block diagram of thegraphical program. As another example, computer 82 may display thegraphical user interface of a graphical program and computer system 90may execute the block diagram of the graphical program.

In one embodiment, the graphical user interface of the graphical programmay be displayed on a display device of the computer system 82, and theblock diagram may execute on a device 190 connected to the computersystem 82. The device 190 may include a programmable hardware elementand/or may include a processor and memory medium which may execute areal time operating system. In one embodiment, the graphical program maybe downloaded and executed on the device 190. For example, anapplication development environment with which the graphical program isassociated may provide support for downloading a graphical program forexecution on the device in a real time system.

As will be described in more detail below, in some embodiments, thecomputer system 82 may be coupled to additional devices, e.g., comprisedin the computer system 82, comprised in the second computer system 90,and/or coupled to one or both of the computer systems 82 and 90 via thenetwork 84. Software executing on the computer system 82 may be operableto receive graphical program from, or generate graphical program basedon, the devices (including computer system 90) on the network 84.

Exemplary Systems

Embodiments of the present invention may be involved with performingtest and/or measurement functions; controlling and/or modelinginstrumentation or industrial automation hardware; modeling andsimulation functions, e.g., modeling or simulating a device or productbeing developed or tested, etc. Exemplary test applications where thegraphical program may be used include hardware-in-the-loop testing andrapid control prototyping, among others.

However, it is noted that the present invention can be used for aplethora of applications and is not limited to the above applications.In other words, applications discussed in the present description areexemplary only, and the present invention may be used in any of varioustypes of systems. Thus, the system and method of the present inventionis operable to be used in any of various types of applications,including the control of other types of devices such as multimediadevices, video devices, audio devices, telephony devices, Internetdevices, etc., as well as general purpose software applications such asword processing, spreadsheets, network control, network monitoring,financial applications, e-commerce, games, etc.

FIG. 2A illustrates an exemplary instrumentation control system 100which may implement embodiments of the invention. The system 100comprises a host computer 82 which connects to one or more instruments.The host computer 82 may comprise a CPU, a display screen, memory, andone or more input devices such as a mouse or keyboard as shown. Thecomputer 82 may operate with the one or more instruments to analyze,measure or control a unit under test (UUT) or process 150.

The one or more instruments may include a GPIB instrument 112 andassociated GPIB interface card 122, a data acquisition board 114 andassociated signal conditioning circuitry 124, a VXI instrument 116, aPXI instrument 118, a video device or camera 132 and associated imageacquisition (or machine vision) card 134, a motion control device 136and associated motion control interface card 138, and/or one or morecomputer based instrument cards 142, among other types of devices. Thecomputer system may couple to and operate with one or more of theseinstruments. The instruments may be coupled to a unit under test (UUT)or process 150, or may be coupled to receive field signals, typicallygenerated by transducers. The system 100 may be used in a dataacquisition and control application, in a test and measurementapplication, an image processing or machine vision application, aprocess control application, a man-machine interface application, asimulation application, or a hardware-in-the-loop validationapplication, among others.

FIG. 2B illustrates an exemplary industrial automation system 160 whichmay implement embodiments of the invention. The industrial automationsystem 160 is similar to the instrumentation or test and measurementsystem 100 shown in FIG. 2A. Elements which are similar or identical toelements in FIG. 2A have the same reference numerals for convenience.The system 160 may comprise a computer 82 which connects to one or moredevices or instruments. The computer 82 may comprise a CPU, a displayscreen, memory, and one or more input devices such as a mouse orkeyboard as shown. The computer 82 may operate with the one or moredevices to a process or device 150 to perform an automation function,such as MMI (Man Machine Interface), SCADA (Supervisory Control and DataAcquisition), portable or distributed data acquisition, process control,advanced analysis, or other control, among others.

The one or more devices may include a data acquisition board 114 andassociated signal conditioning circuitry 124, a PXI instrument 118, avideo device 132 and associated image acquisition card 134, a motioncontrol device 136 and associated motion control interface card 138, afieldbus device 170 and associated fieldbus interface card 172, a PLC(Programmable Logic Controller) 176, a serial instrument 182 andassociated serial interface card 184, or a distributed data acquisitionsystem, such as the Fieldpoint system available from NationalInstruments Corporation, among other types of devices.

In the embodiments of FIGS. 2A and 2B, described above, one or more ofthe various devices may couple to each other over a network, such as theInternet. In some embodiments, one or more programs according to thepresent invention may be operable to generate and/or analyze graphicalprograms used in conjunction with these devices. For example, softwareexecuting on computer system 82 may analyze graphical programs that eachutilize one or more of such devices (or others), and may merge thegraphical programs, where the merged graphical program operates inconjunction with a union of the utilized devices. Further detailsregarding the merging of graphical programs is provided below.

As noted above, in some embodiments, at least a portion of the softwaremay be implemented in a graphical programming language, such as the “G”graphical programming language provided by National InstrumentsCorporation.

Graphical software programs which perform data acquisition, analysisand/or presentation, e.g., for measurement, instrumentation control,industrial automation, modeling, or simulation, such as in theapplications shown in FIGS. 2A and 2B, may be referred to as virtualinstruments.

FIG. 3—Computer System Block Diagram

FIG. 3 is a block diagram representing one embodiment of the computersystem 82 and/or 90 illustrated in FIGS. 1A and 1B, or computer system82 shown in FIG. 2A or 2B. It is noted that any type of computer systemconfiguration or architecture can be used as desired, and FIG. 3illustrates a representative PC embodiment. It is also noted that thecomputer system may be a general purpose computer system, a computerimplemented on a card installed in a chassis, or other types ofembodiments. Elements of a computer not necessary to understand thepresent description have been omitted for simplicity.

The computer may include at least one central processing unit or CPU(processor) 160 which is coupled to a processor or host bus 162. The CPU160 may be any of various types, including an x86 processor, e.g., aPentium class, a PowerPC processor, a CPU from the SPARC family of RISCprocessors, as well as others. A memory medium, typically comprising RAMand referred to as main memory, 166 is coupled to the host bus 162 bymeans of memory controller 164. The main memory 166 may store graphicalprograms, as well as software according to embodiments of the presentinvention for analyzing the graphical programs. The main memory may alsostore operating system software, as well as other software for operationof the computer system.

The host bus 162 may be coupled to an expansion or input/output bus 170by means of a bus controller 168 or bus bridge logic. The expansion bus170 may be the PCI (Peripheral Component Interconnect) expansion bus,although other bus types can be used. The expansion bus 170 includesslots for various devices such as described above. The computer 82further comprises a video display subsystem 180 and hard drive 182coupled to the expansion bus 170.

As shown, a device 190 may also be connected to the computer. The device190 may include a processor and memory that may execute a real timeoperating system. The device 190 may also or instead comprise aprogrammable hardware element. The computer system may be operable todeploy a program to the device 190 for execution of the program on thedevice 190. As noted above, in some embodiments, the program may be agraphical program. For example, the deployed graphical program may takethe form of graphical program instructions or data structures thatdirectly represents the graphical program. Alternatively, the deployedgraphical program may take the form of text code (e.g., C code)generated from the graphical program. As another example, the deployedgraphical program may take the form of compiled code generated fromeither the graphical program or from text code that in turn wasgenerated from the graphical program.

FIG. 4—Example Graphical Program

As noted above, a graphical program may comprise a plurality of nodes oricons, where the plurality of interconnected nodes or icons visuallyindicate functionality of the program. The nodes may represent softwareand/or hardware functionality, and the graphical program may comprise adata flow, control flow, or execution flow diagram, representing thefunctionality of the software and/or hardware.

FIG. 4 illustrates an example graphical program or virtual instrumentsuch as may be used in a variety of systems. It should be noted,however, that the graphical programs described herein are intended to beexemplary only, and are not intended to limit the graphical programsused in or by embodiments of the present invention to any particularform, function, or appearance. The graphical programs used herein werecreated using the LabVIEW graphical programming system, provided byNational Instruments Corporation, although any other types of graphicalprograms and/or graphical programming systems are also contemplated

In preferred embodiments, each graphical program includes a plurality ofobjects. An object may be defined as having attributes, or properties,and methods according to the notion of objects in the art of objectoriented programming. Preferably, an object has an associated icon whichvisually represents the object, as shown in FIG. 4. As used herein, theterm “node” refers to an icon in the graphical program, and may alsoinclude the object that it represents. Preferably, the graphical programcomprises a block diagram portion and a user interface panel portion,and the objects are arranged in these two portions: the block diagramportion and the user interface panel portion. Alternatively, the objectsmay be comprised solely in a block diagram or graphical program portion.In this embodiment, user interface objects, if present, may be comprisedin the block diagram portion.

A user interface panel is shown in the window in the upper right handportion of FIG. 4 and a block diagram is shown in the window in thelower left hand portion of FIG. 4. In the case of instrumentationcontrol applications, the user interface panel is typically referred toas an instrument front panel, or front panel. The objects in the userinterface panel include controls and indicators. Controls are used toreceive input, typically from a user, and to provide the input data tothe block diagram. Indicators are used to receive output data from theblock diagram and display the output data to the user. Examples ofindicators are graphs, thermometers, meters and gauges. Examples ofcontrols are slides, knobs, switches, buttons and dials. In oneembodiment, the controls and indicators include clusters of controls andindicators arranged in a hierarchical manner.

Preferably, the user interface panel comprises a directed acyclic graphof objects. In particular, the user interface panel may comprise ahierarchical tree structure wherein the nodes of the tree are the userinterface panel objects. A graph may be defined as a finite non-emptyset of vertices and a set of edges such that every edge connects exactlytwo vertices. Preferably, any two vertices may be connected by zero ormore edges. In the user interface panel, the vertices are the controland indicator objects and the edges are the hierarchical relationshipbetween the objects. The direction of the edges are determined by thelevel in the hierarchy. That is, the direction is from higher levelobjects to lower level objects. The connectivity of an object is relatedto the other objects to which it is connected, i.e., its neighboringobjects, and the edges by which it is connected to its neighboringobjects.

The block diagram is the portion of the graphical program which includesthe graphical code to perform the calculations and operations of thegraphical program application. The objects in the block diagram includeterminals associated with the front panel controls and indicators. Thefront panel terminals are used to input and output data between thefront panel controls/indicators and the function blocks of the blockdiagram. The block diagram objects also include function nodes, such asmathematical operators; code execution structures such as for loops,while loops, case statements, and variable references; string functions;file I/O nodes; communication nodes; instrument I/O nodes; and dataacquisition nodes, for example. Preferably, the block diagram nodes areconnected by data paths, or signals, which determine the flow of datathrough the block diagram.

In the preferred embodiment, the block diagram comprises a data flowdiagram arranged as a directed acyclic graph. The vertices of the graphare the terminals and nodes of the block diagram. The edges of the graphare data path signals which connect the nodes and terminals. The nodesthemselves comprise one or more terminals which are connected to theedges. The direction of the edges of the graph is determined by thenodes themselves. For example, if a signal is connected between anoutput terminal of a first node and an input terminal of a second node,then the direction of data flow on that edge is from the output terminalto the input terminal.

Merging Graphical Programs

Graphical differencing, an example of which is described below withreference to FIG. 6, is an essential tool for source code control wheregraphical programming and modeling applications are used. Graphicalmerge is a natural extension of these ideas, and has broad utility inthe development and maintenance of graphical program-based systems.Graphical merge may be used to copy and paste differences (e.g.,automatically) from one graphical program, which may be represented byor referred to as a graph (where a graph comprises a collection of nodesand edges, as is well known to those skilled in the programming arts),to another. For example, the merge process may be used as a feature ofsource code control to: manually merge changes made to a local file tothe version in source code control, manually merge changes in sourcecode control to the local version, and automatically merge changesbetween two branches where there is a common ancestor version, amongother uses.

FIG. 5—Method for Merging Graphical Programs

FIG. 5 illustrates a computer-implemented method for merging graphicalprograms, according to one embodiment. The method shown in FIG. 5 may beused in conjunction with any of the computer systems or devices shown inthe above-described Figures, among other devices. In variousembodiments, some of the method elements shown may be performedconcurrently, in a different order than shown, or may be omitted.Additional method elements may also be performed as desired. As shown,this method may operate as follows.

First, in 502, information regarding first and second graphical programsmay be received, where, as noted above, each graphical program comprisesa respective plurality of interconnected nodes that visually indicatefunctionality of the graphical program. Henceforth, in this document theprogram elements, e.g., icons, controls, indicators, etc., comprised inor represented in the graphical programs may be referred to by the term“nodes”. In a preferred embodiment, at least one of the graphicalprograms is comprised in a measurement system.

In various embodiments, the information regarding the first and secondgraphical programs may be any type of information related to orcharacterizing the graphical programs. For example, in some embodimentsthe information may include the graphical programs themselves. In otherembodiments, the information regarding a graphical program may includeone or more of: an abstract representation of the graphical program,e.g., a data structure or description specifying the plurality of nodes,and optionally, their interconnections, VI attributes, e.g.,identification, sub-VIs, configuration data, version information,descriptions, underlying implementation, i.e., code, deployment (i.e.,the location and/or execution target of a component), and so forth.Thus, the information regarding the first graphical program may includeone or more of: the first graphical program, a graph of the firstgraphical program, a description of the first graphical program, and adata structure specifying the first graphical program, among others.

Thus, the information for each graphical program may include informationrelated to the nodes and their attributes, and may also includeinformation related to the connectivity or associations between thenodes.

Note that the first and second information may be received in any of avariety of ways. For example, in various embodiments, the informationregarding the first and/or second graphical program may be provided bythe user, e.g., via a GUI displayed on the client system, and/or by anexternal system, e.g., by a server system coupled to the client system.In some embodiments, the method may include querying the client systemand/or the server to determine the first and/or second information.

In some embodiments, the user may provide information describing orspecifying a task or system functionality, e.g., via a GUI displayed onthe client system and provided by the client system and/or the servercomputer system, e.g., via a GUI displayed on a vendor's website. Themethod may then include automatically or programmatically determining agraphical program (or programs) suitable for performing the specifiedtask, i.e., determining the first information. For example, based on theinformation describing or specifying the task or desired functionality,the server (or client) may query a database of graphical programs (ortheir descriptions) to determine or select a graphical program suitablefor performing the desired task. For example, an internal or externaldatabase or equivalent may be queried to determine the secondinformation and/or the second graphical program. Note that as usedherein the term “database” may include a distributed database thatcomprises a plurality of databases distributed over a network.

FIG. 8A illustrates two simple example graphical programs (blockdiagrams) to which a graphical differencing or “diff” function has beenapplied. Note that the block diagrams of the two graphical programs aredisplayed side by side in FIG. 8A. More specifically, FIG. 8A shows twoversions of a virtual instrument (VI) in which, beginning on the left ofeach block diagram, a constant with value “32” (top) is added to anumeric value input via a front panel terminal labeled “Numeric” via anadd operator, labeled “+”. The result is input into a loop structure,which loops until a value provided by a random number generator (diceicon) each cycle is less than a loop counter, labeled “i”. Uponcessation of the looping, the random number for that cycle (which isless than the final loop counter value) and the original sum input intothe loop are provided to another operator. In the first or left blockdiagram, the operator is a subtraction operator, which subtracts therandom number from the original sum. In the second or right blockdiagram, the operator is a multiplication operator, which computes aproduct of the original sum and the random number. In each case, theresult is then provided to another front panel terminal, labeled “x*y”,e.g., for display on a front panel of the graphical program (not shown).

As indicated in 504, the first and second information received in 502above may be analyzed to determine matches and differences between thetwo programs.

In some embodiments, analyzing the first and second information todetermine matches and differences between one or more of: the nodescomprised in the first and second programs, sub-programs, referred to assub-VIs comprised in the first and second graphical programs,configuration data of the first and second graphical programs, anddeployment of the programs and/or nodes, among others. In someembodiments, matches and differences between the nodes of the first andsecond graphical programs may include matches and differences in one ormore of: software versions, number and types of associated hardware,deployment, source code of the programs, deployment of the programs, andconfiguration of the programs, among others.

In some embodiments, the determined matches and differences between thefirst graphical program and the second graphical program may alsoinclude matches and differences in interconnectivity of nodes or objectscomprised in the first and second graphical programs, which, dependingon the nature of the programs, may include matches and differences inone or more of: physical or logical connectivity between nodes orobjects, data flow or signal flow between nodes or objects, dependenciesbetween nodes, and calling relationships between nodes, among others.

The analysis and merging of the first and second graphical programs maybe performed in any of a variety of ways. For example, in oneembodiment, the graphical programs, or representations thereof, may betraversed or “walked”, to enumerate their respective nodes andconnections, e.g., if the graphical programs are represented byrespective graphs (nodes and edges), each graph may be traversed, whereeach node and connection is recorded, e.g., in respective lists.

Thus, in some embodiments, the analyzing may include creating one ormore data structures which include information regarding the firstplurality of nodes in the first graphical program and the secondplurality of nodes in the second graphical program. Determining matchesand differences may then include comparing the one or more datastructures to determine the matches and differences. Thus, the one ormore data structures may each comprise directed graphs comprising aplurality of vertices connected by edges, where each of said verticesrepresents one of the nodes in a respective one of the first and secondgraphical programs.

In some embodiments, the differences and/or matches may be determined inaccordance with specified criteria or guidelines. In other words,analyzing the first and second information to determine differencesand/or matches between the graphical programs may be performed inaccordance with specified difference and/or match criteria, such as, forexample, difference/match tolerance levels, category or type, cost, andperformance, among others. For example, a tolerance criterion mayspecify that different versions of the same nodes or software programsare not to be considered different, i.e., are to be considered a match.In one approach, a difference or matching score may be computed, e.g.,based on similarities or differences between the nodes, where exceedinga tolerance threshold may determine whether two nodes match. Thisthreshold may be set to reflect a specified tolerance. Thus, in someembodiments, the user may specify a tolerance level or schema regardingmatches and differences between nodes represented in the graphicalprograms.

As another example, category criteria may specify that only certainaspects of the graphical programs are to be considered, e.g.,implementation code, associated hardware, deployment, or configurationinformation, among others. As an example of category criteria based onfunctionality, nodes or other objects with similar functionality may beconsidered a match, e.g., two different types of oscilloscope (virtualor real), data acquisition card, signal generator, etc. Cost criteriamay specify cost-related aspects of nodes that may have bearing on thedetermined differences and/or matches. Similarly, performance criteriamay specify what constitutes a differences and/or match based onfunctional performance of nodes, where performance may refer to any typeof performance-related metric, such as, for example, speed, throughput,memory-size, and so forth. The criteria or guidelines may be stored onthe host computer system or a device coupled to the host system over anetwork. In some embodiments, the criteria may be specified by the user.Thus, the method may include receiving user input specifying thedifference and/or match criteria, e.g., via a graphical user interface(GUI).

As another example, the user may specify a particular view, e.g.,software, associated hardware, GUI elements, and/or configurationinformation, to which the analysis may be directed. Thus, for example,if the user (or a default setting) specifies a software view, theanalysis may only consider software nodes of the graphical programs.Similarly, if a hardware view is specified, the analysis may onlyconsider hardware associated with the nodes of the graphical programs.

In some embodiments, the user may specify a tolerance for thedetermination of matches and differences between nodes, which may inturn determine whether two similar nodes in the two graphical programsshould be considered a match or not. For example, the user may specifythat in cases where two nodes (each from or represented in a respectivegraphical program) are identical but for configuration, the nodes areconsidered a match. However, in some embodiments, the analysis maydetermine various differences between the two original nodes, optionallyin response to user input, e.g., by right-clicking on the node icon. Asanother example, the user may specify that the process not distinguishbetween software versions.

As mentioned above, in some embodiments, the analysis of the first andsecond information may include determining differences between the firstand second graphical programs. In a preferred embodiment, the determineddifferences may correspond to or reflect any type of differences betweenthe first and second graphical programs.

The determination of the differences between the first and secondgraphical programs may be performed in a variety of different manners.In some embodiments, the analyzing may include creating one or more datastructures which include information regarding the first plurality ofnodes in the first graphical program and the second plurality of nodesin the second graphical program, where determining differences includescomparing the one or more data structures to determine the differences.For example, as noted above, in one embodiment, the one or more datastructures may each comprise directed graphs including a plurality ofvertices connected by edges, where each of the vertices represents oneof the nodes in a respective one of the first and second graphicalprograms. The directed graphs may then be analyzed to determine thedifferences. For example, in one embodiment, the graphical programs, orrepresentations thereof, may be traversed or “walked”, to enumeratetheir respectively nodes and connections. For example, if the graphicalprograms are represented by respective graphs, each graph may betraversed, where each node and connection (if any) is recorded. Theresulting lists may then be compared to determine the differences.

It should be noted that in some embodiments, determining the differencesbetween the graphical programs may also include determining differencesbetween nodes in the corresponding graphical programs. For example, insome embodiments, differences between nodes comprised in the first andsecond graphical programs may include differences in one or more of:number and types of the nodes, in the case that some nodes are sub-VIs,sub-nodes of the sub-VIs, and configuration of the nodes, among others.For example, consider the case where the same type of node isrepresented in both graphical programs, but where one or more aspects ofthe node differ in the two graphical programs, e.g., versions,configuration data, deployment or target device, etc. The method mayinclude determining all or part of these node differences.

For example, in some embodiments, during the analysis of the informationregarding the graphical programs, e.g., during traversal of thegraphical programs, each node or information representing or relating toeach node, may be analyzed to determine any distinctions betweenotherwise similar or identical nodes. Note that as mentioned above,these “sub-node” differences may be between software, data, e.g.,configuration data, and/or any other aspect of the respective nodes.Thus, for example, if the two graphical programs each includes a readnode, the method may determine that the two read nodes include differentconfiguration data, say, or target hardware. As yet another example, twonodes may be compared or “diffed” to determine differences in sourcecode between the two nodes. Note that in various embodiments,differences between nodes included in the first and second graphicalprograms may include differences in one or more of: software versions,number and types of nodes, sub-VIs of the programs, source code of thenodes, deployment of the nodes, and configuration of the nodes, amongothers. These differences may apply to both the block diagrams and theuser interface elements of the programs. In other words, both the blockdiagrams and the front panels (or other GUIs) of the graphical programsmay be “diffed” (and merged).

Turning again to FIG. 8A, the determined differences (and thus, matchesas well) are indicated via a dashed outline of the differing blockdiagram elements, specifically, the operator to the right of the loop,which, as discussed above, is a subtraction operator in the left blockdiagram, and a multiply operator in the right block diagram. Note thatin this particular example, the dashed outline delineates the operatorand the connections or wires coupled to the operator.

As FIG. 8A also shows, a dialog box is presented below the blockdiagrams indicating the number of differences found (1 Difference,“Block Diagram objects”), and the general type of difference found (1Detail, “objects replaced/added/deleted”). As also shown, in thisexemplary embodiment, user interface elements (e.g., buttons) areprovided allowing the user to invoke such functionality as “ShowDifference”, “Clear”, “Show Detail”, and to specify that the determineddifference(s) be circled. Additionally, as shown on the right side ofthe dialog box, in this embodiment, buttons are provided for furtherfunctionality, such as “Update”, block diagram presentation options,such as “Tile Left and Right” and “Tile Up and Down”, and “Help”. Notethat the options presented in this dialog are meant to be exemplary onlyand are not intended to limit the user specified difference options toany particular set of options. In other words, in other embodiments, anyfunctionality may be included as desired.

A more detailed example of one embodiment of a difference technique isdescribed below with reference to FIG. 6.

In 506, the first and second graphical programs may be merged based onthe determined matches and differences, thereby generating a mergedgraphical program. For example, following the example above, theresulting lists may be analyzed and compared, e.g., removingredundancies between the two lists, and the merged graphical programgenerated based on the results. The merged graphical program mayrepresent “merged” functionality, where, for example, or, alternatively,may comprise a union (in the set-theoretic sense) of the respectivefunctionalities of the first and second graphical programs.

In another embodiment, the merged graphical program may be generated asthe first and second graphical programs are traversed or walked,obviating the intermediate lists. For example, each graphical programmay be traversed at least partially to determine a common node orresource, and then both graphical programs may be traversed startingwith the common node in each. The method may then walk the respectivegraphical programs (or representations, e.g., graphs, data structures,etc.), adding and connecting nodes in a new graphical program (themerged graphical program) corresponding to those encountered in thetraversals of the first and second graphical programs. Note that wherethe same nodes are encountered in the first and second graphicalprograms, only one corresponding node may be added to the mergedgraphical program, thereby avoiding redundancies in the merged graphicalprogram.

In some embodiments, the information received in 502 above may compriselists of nodes, as well as lists of connections between the nodes. Theanalysis may then include analyzing and merging the lists, thengenerating the merged graphical program based on the merged list. Ofcourse, depending upon the type and form of the received information,any other type of comparison and analysis may be made as appropriate togenerate the merged graphical program.

As mentioned above, in various embodiments, the user may specify variouscriteria, e.g., tolerance levels, priority, or schema regardingdifferences between components of the graphical programs, and a mergedgraphical program may be generated in accordance with the criteria.

There are numerous ways to invoke and otherwise specify the mergeoperation. For example, FIG. 8B illustrates user selection of a “Mergeto Right” option with respect to the left block diagram, which mayoperate to merge the left block diagram into the right block diagram,possibly replacing corresponding elements already present in the rightblock diagram. Similarly, FIG. 8C illustrates user selection of a “Mergefrom Left” option with respect to the right block diagram, which invokesthe same functionality as that shown in FIG. 8B, but from the rightblock diagram. In other words, both FIG. 8B and FIG. 8C show invocationof a merge operation that merges the left block diagram into the rightblock diagram.

FIGS. 8E and 8F illustrate two respective invocations of a “right toleft” merge operation, where, as shown, FIG. 8E illustrates invocationof a “Merge to Left” operation with respect to the right block diagram,and FIG. 8F illustrates invocation of a “Merge from Right” operationwith respect to the left block diagram. As with FIGS. 8B and 8C, themerge operations of FIGS. 8E and 8F have the same effect.

Thus, in some embodiments, the merged graphical program may be generatedby modifying the first or second graphical program, i.e., adding,deleting, and/or replacing, any “different” nodes and/or connections tothe graphical program, where the affiliation of each of the nodes and/orconnections may be indicated, e.g., the first or second graphicalprogram. In some embodiments, a temporary third graphical program may beproduced and used to update or modify the first or second graphicalprogram.

Alternatively, the merged graphical program may be generated as a newgraphical program. In some embodiments, the method may include receivinguser input specifying the generation of the merged graphical program.For example, the user may specify that the first graphical program is tobe modified to generate the merged program, or that the merged graphicalprogram be separate and distinct from the first and second graphicalprograms.

As noted above, in some embodiments, details for listed differencesbetween block diagram objects may be provided. For example, displayingthe differences may also include displaying a text description of thedifferences. Additionally, in some embodiment, portions of the blockdiagram which are not part of the currently selected difference may be“grayed out” so that the difference may be visually highlighted for theuser.

In one embodiment, the differences may be displayed in a distinguishingcolor. For example, a black rectangular background may be displayedbehind the constant node in the first block diagram for a first periodof time (such as two seconds), and then a black rectangular backgroundmay be displayed behind the constant node in the second block diagramfor a similar period of time. This highlights the difference for theuser so that the user can visually distinguish the difference.

In another embodiment, the differences may be surrounded with a dynamicdashed line, referred to as “marching ants”, i.e., using visual movementof alternating colors, such as black and white, around a differingobject in each of the graphical programs. In operation, the alternatingblack and white portions “move” visually around the nodes and along thewire to highlight the difference.

It should be noted that any of the display techniques described above(or others) may also be used in displaying such differences in themerged graphical program. For further information regarding “diffing”graphical programs, please see U.S. patent application Ser. No.09/339,340 titled “System, Method and Memory Medium for DetectingDifferences Between Graphical Programs,” which was incorporated byreference above.

In one embodiment, undo and redo functionality for the diff/mergeprocesses described above may be provided. For example, userinteractions and responsive actions performed by the system and methoddescribed herein, collectively referred to as “actions”, may berecorded, e.g., in a stack or other data structure, in the orderperformed, allowing the user to undo or retract actions in reverse orderfrom that of their performance. This recorded sequence of actions mayalso be used to provide redo functionality, where actions or eventsundone by the undo functionality may be redone as desired.

Note that in various embodiments, the actions may be recorded asrespective state information describing the state of the diffed/mergedprograms before and/or resulting from the action. For example, in oneembodiment, each stored action may have an associated “diff” record,indicating the change of state of the diffed/merged programscorresponding to each action. In another embodiment, backup copies ofthe program(s), and/or auxiliary information, e.g., diff/mergeconfiguration information, corresponding to each recorded action may bestored.

In yet another embodiment, the actions may be recorded as respectiveinformation whereby the system may access the functions that perform theactions and/or inverse functions for undoing the actions, e.g., functioncodes or pointers, and operands of the functions. Note that in variousembodiments, the undo/redo functionality may apply to any actions of thediff/merge process as desired, including configuration steps, etc. Theinformation stored for each recorded action may be referred to asdiff/merge information. Further information regarding one embodiment ofundo/redo functionality may be found in U.S. Pat. No. 5,990,906 titled“Undo Feature for a Graphical Programming System”, which wasincorporated by reference above.

Note that the examples presented herein are meant to be exemplary only,and are not intended to limit the contemplated differences discernableby the method to any particular type. A more detailed description of oneembodiment of the merge process (method element 506) is provided belowwith reference to FIG. 7.

In 508, the generated merged graphical program may be displayed on adisplay device, e.g., a computer monitor, printer, etc. There arenumerous ways in which the merged graphical program may be displayed,any of which may be used as desired. For example, in one embodiment, themerged graphical program may be displayed where nodes and/or connectionscommon to both graphical programs, and/or those exclusive to eachgraphical program may be graphically displayed in such as way as todistinguish between them, e.g., via color, line-style, labels, enclosingborders, and so forth. In other words, a graphical program may bedisplayed that displays a set union or “merge” of the nodes and/orconnections of the two graphical programs, where the nodes and/orconnections are graphically displayed to indicate whether they arecommon to both graphical programs, and/or if not common, to which systemthey belong, e.g., by highlighting, color, outline, style, labels, etc.In other words, nodes and/or connections common to both graphicalprograms, and/or those exclusive to each graphical program may begraphically displayed in such as way as to distinguish between them.Thus, in some embodiments, the graphical programs may be merged togenerate a merged graphical program, and the results displayed.

In some embodiments, the merged graphical program may be indicatedtextually, e.g., as lists or tables of nodes and optionally, theirconnectivity. For example, names of nodes (and optionally, connectivity)may be grouped according to their graphical program affiliation,including a “common” group comprising those common to both graphicalprograms.

FIG. 8D illustrates the result of either of the two (left to right)merge operations of FIGS. 8B and 8C, where, as may be seen, the multiplyoperator of the right block diagram has been replaced with thesubtraction operator of the left block diagram.

FIG. 8G illustrates the result of either of the two (right to left)merge operations of FIGS. 8E and 8F, where, as may be seen, the multiplyoperator of the right block diagram has replaced the subtractionoperator of the left block diagram.

Any other means of displaying the merged graphical program are alsocontemplated, including, for example, combinations of textual andgraphical representations. For example, displaying the merged graphicalprogram may also include graphically indicating the matches anddifferences between the first and second graphical programs in themerged graphical program, and/or displaying a textual description ofmatches and differences between the first and second graphical programs.In one embodiment, graphically indicating the matches and differencesbetween the first and second graphical programs in the merged graphicalprogram may include highlighting the differences between the first andsecond graphical programs in the merged graphical program.

Thus, in various embodiments, displaying the merged graphical program ona display device may include one or more of: displaying a textualdescription of each of the matches and differences, and displaying amerged graphical program comprising a union of the first and secondgraphical programs and highlighting the differences (and/or matches)between the first and second graphical programs. An example of a mergedgraphical program according to one embodiment is described below.

The merged graphical program may be used for any of a variety ofpurposes. For example, in one embodiment, the first graphical programmay comprise a desired program specification or functionality, and thesecond graphical program may comprise a program that the user may wishto modify to bring in accordance with the specification. In someembodiments, the determined differences and/or matches between the twoprograms, and represented in the merged graphical program, may be usedto place an order for any components, e.g., graphical program nodes orelements, needed to bring the second graphical program into accordancewith the specification, i.e., the first graphical program, and/or toacquire missing components directly, e.g., via downloading from a serversystem. Thus, in some embodiments, the method of FIG. 5 may furtherinclude providing means for enabling the user to acquire needed butmissing components for the second graphical program.

For example, in one embodiment, software executing on a client computersystem, e.g. the users computer system, and/or software executing on aserver computer, e.g. coupled to the client computer, may analyze thedetermined differences and may automatically initiate acquisition and/orpurchase of the missing (one or more) components. In one embodiment, thesoftware may automatically order the components without user input,e.g., via the network (e.g., the Internet), for example, if the user'sbilling or payment information (e.g., credit card number, credit accountnumber, etc.) is already stored or available to the software. In otherwords, the system may comprise an e-commerce system that automaticallyorders and purchases the needed components based on the determineddifferences. In other embodiments, the user may be presented with a GUI,e.g., displayed on the client system and provided by the server and/orthe client system, prompting the user for input regarding completion ofthe second graphical program. For example, the GUI may display themerged graphical program, e.g., highlighting those components that aremissing in the second graphical program, and may prompt the user with a“Complete the graphical program?” message or equivalent. In response toa positive answer from the user, a search for and/or order of themissing components may then be performed. For example, one or morequotes for each missing component may be presented to the user,including, for example, cost, vendor, delivery times, and/or any otherinformation useful for making a purchase decision, where the quotes maybe retrieved from a database, via a network search engine, or any othersource of quote information. As another example, the user may click oneach of the missing components in the diagram, thereby invokingrespective options related to that component, such as, for example,searching for similar components, ordering the component, etc. The GUImay also facilitate user entry or specification of payment informationfor acquiring the components. Note that in some cases, one or more ofthe needed components may be free, e.g., software components availablefor download from a server, etc. Note that in embodiments where thedetermined differences and matches include hardware associated with thegraphical programs, the components searched for and quoted (andoptionally ordered or otherwise acquired) may include hardwarecomponents.

Where multiple versions of a component are available, selection orpriority criteria, possibly specified by the user, may be used to selectamong the possible components. The selection criteria may specifydesirable attributes such as cost, performance, manufacturer/vendor,delivery time and/or means, and so forth, which may guide in theselection of the components.

In other embodiments, at least some user input may be required toacquire the components. For example, in one embodiment, the clientcomputer system may contact a server computer system to acquire thedesired components. In one embodiment, a GUI may be presented to theuser on a display device of the client computer system (e.g., possiblythe GUI of 506 and/or 508 above), where the GUI may be provided by theclient computer system and/or by the server. In one embodiment, the usermay specify which components are needed, although in other embodiments,the GUI may indicate to the user which components (or component types)are needed by the second graphical program to bring it into compliancewith the specification, i.e., the first graphical program.

Thus, the GUI may present user-selectable options for acquiring themissing graphical program components or elements. As one example, theGUI may simply provide a list of the needed components (possiblynumerous versions of each) and contact information for sources orvendors of the components, e.g., names, addresses, telephone numbers,websites or URLs, and so forth. As another example, the GUI may presentvarious ordering options and/or means for acquiring the components,including, for example, user-selectable links for placing orders over anetwork, e.g., the Internet, or for downloading software (including, forexample, hardware configuration programs for programmable hardwareelements) and/or data, e.g., configuration data. In some embodiments,the GUI may present information to help the user select components, suchas, for example, cost, vendor, manufacturer, technical specifications,order fulfillment times, and so forth. The GUI may also facilitate userentry of payment, billing, or account information needed to purchase thecomponents, as mentioned above.

In some embodiments, the method (e.g., the server) may automaticallydetermine possible sources for candidate components by accessing aninternal or external database, or by searching a network, e.g., theInternet, where, as noted above, specified selection or prioritycriteria may be used to guide the search.

It should be noted that in some embodiments, the search may not beperformed solely on the basis of each required individual component. Forexample, a subset of a system may be represented by a graph structure,and successive, expanding, subsets of the system may be queried for inthe database(s). This user may thus be able to purchase a sub-systembased on the ability of a vendor to have available a connected subset ofa system.

The user may purchase the different components from different vendors.As noted above, some of the components may be available for free ordownload via a network connection. For example, the user may requiredriver software and may be able to freely download it and update hisgraphical program. In some cases, the user may have on hand some of thenewly identified missing components, and so may mark these componentsfor exclusion in the search operation to obtain a quotation.

In one embodiment, if the search is unable to find an exact match, avendor (e.g., software operating on a vendor server and/or a humanoperator, may determine that a modified version of the desired componentor subsystem may be created for the user, and may present this modifiedsolution for consideration by the user. The vendor may set thresholdsfor matching in order to be notified when such requests are made. Thevendor may be able to manually respond to the request by the user inthis case where a database query alone may not have resulted inprovision of a valid quotation to the user.

The user may be prompted to approve or initiate a suggested order orpurchase, or to select from candidate components, after which the ordermay be placed, and the component delivered for inclusion in the secondgraphical program. For example, in one embodiment, the server (oranother external server system) may download the component directly tothe client computer system, from which the component may be deployed tothe second graphical program. As another example, if the secondgraphical program (which may reside on the client computer system) isnetworked to the server, the server may automatically download anddeploy the component to the second graphical program. In anotherembodiment, the server (or another system) may download the component tothe client computer system, and the client computer system mayautomatically deploy the component to the second graphical program,e.g., possibly using installation software downloaded with thecomponent.

Thus, the system may be operable to determine missing components, orderand purchase the components, and deploy the components to the secondgraphical program, e.g., in order to bring the second graphical programinto compliance with the first graphical program. Thus, one or more ofthe missing components may be acquired, e.g., via download from theserver (or a different server) and/or via more physical means, such asdelivery via any of various delivery or postal means.

Merged Graphical Programs

As noted above, in a some embodiments, the merged graphical programgraphically represents differences and/or matches between the graphicalprograms, and, depending upon the particular specification of the mergeprocess, e.g., which portions or views of the graphical programs aremerged, may comprise a union of the elements of the two graphicalprograms.

For example, consider a first graphical program with nodes A-F, and asecond graphical program with nodes C-H, and assume that the mergeprocess has been specified to apply to the two programs in theirentirety. The resulting merged graphical program preferably includesnodes A-H, where the overlapping nodes, C-F, are not duplicated. Thus,for example, although node C appears (once) in each of the first andsecond graphical programs, only one node C is present in the mergedgraphical program.

Similarly, assume that the first graphical program includes connectionsAC, BC, CD, DE, EF, among the nodes A-F, and the second graphicalprogram includes connections CD, DE, EF, EG, and GH among the nodes C-H.The resulting merged graphical program preferably includes nodes A-H, asdescribed above, and also includes connections AC, BC, CD, DE, EF, EG,and GH among these nodes. Thus, the merged graphical program of thisexample includes the union of the nodes and the connections of the firstand second graphical programs.

As also noted above, the merged graphical program preferably denotesgraphically whether the respective nodes and connections are from thefirst graphical program, the second graphical program or both. Thus, inone embodiment, nodes A and B, and connections AB and BC may be denoted(e.g., by color, line-style, borders, etc., as described above) asoriginating in the first graphical program. Similarly, nodes G and H,and connections EG and GH may be denoted as originating in the secondgraphical program. Finally, nodes C, D, E, and F, and connections CD,DE, and EF may be denoted as being common to both the first and secondgraphical programs.

Thus, a user may quickly ascertain from the merged graphical programwhere the two graphical programs differ, and conversely, where theymatch. This information may then be used for any of a variety ofpurposes, as described above. For example, the user may analyze themerged graphical program and may then decide whether the differencesrequire modification of one or both of the graphical programs. Ofcourse, as described above, in other embodiments, the differences(and/or matches) may be indicated in any of a variety of ways,including, for example, using graphical indications such ashighlighting, color, outline, style, labels, and so forth, or textualmeans, such as tables, lists, descriptions, etc., as desired.

In other embodiments, the merge process may be performed in such a waythat some differences are merged to one graphical program, e.g., thefirst graphical program, and other differences are merged to another,e.g., the second graphical program. In other words, rather thangenerating a single merged graphical program comprising a union of theoriginal graphical program elements, the user may, on a per differencebasis, direct various merge results to each graphical program (or to twonew graphical programs, if the original graphical programs are to bepreserved). For example, this approach may be useful in cases wheremultiple versions of a program are maintained and extended in parallel,and where some of the features produced in each development process maybe desired in the other.

Thus, in various embodiments, the merge process applied to first andsecond graphical programs may generate a third (new) graphical program,may modify one or both of the first and second graphical programs,and/or may generate two new graphical programs, each comprising amodified (i.e., at least partially merged) version of one of theoriginal graphical programs.

FIG. 6—High-level Diff Flowchart

Referring now to FIG. 6, a flowchart illustrating a method of detectingdifferences between graphical programs according to some embodiments isshown. More specifically, FIG. 6 is a more detailed flowchart of methodelement 504 of FIG. 5, according to one embodiment, although otherdifferencing methods may be used as desired. Preferably, the method ofthe present invention is embodied as a software program that executes ona computer system such as computer system 82 of FIG. 1. The softwareprogram of the present invention for detecting differences betweengraphical programs will subsequently be referred to as “diff” forbrevity. It should be noted that in different embodiments, various ofthe method elements described below may be performed concurrently, in adifferent order than shown, or may be omitted. Additional methodelements may also be performed as desired.

In the preferred embodiment, the graphical programs use graphical dataflow programming, such as the LabVIEW graphical programming environment.However, other graphical programming systems may employ the methoddescribed herein to detect differences between graphical programs.Examples of systems which may employ the method are Visual Designer fromIntelligent Instrumentation, Hewlett-Packard's VEE (Visual EngineeringEnvironment), Snap-Master by HEM Data Corporation, DASYLab by DasyTec,and GFS DiaDem, among others. Programming environments which includegraphical programming elements can also use the graphical diff method ofthe present invention.

In 600, the method (i.e., diff) receives as input two graphical programs(or information regarding the two graphical programs), such as thegraphical program of FIG. 4. Each of the graphical programs includes aplurality of objects. An object may be defined as having attributes, orproperties, and methods according to the notion of objects in the art ofobject oriented programming. Preferably, an object has an associatedicon that visually represents the object, as shown in FIG. 4.Preferably, the graphical program comprises a block diagram portion anda user interface panel portion, and the objects are arranged in thesetwo portions: the block diagram portion and the user interface panelportion. Alternatively, the objects are comprised solely in a blockdiagram or graphical program portion. In this embodiment, user interfaceobjects, if present, may be comprised in the block diagram portion. Auser interface panel is shown in the window in the upper right handportion of FIG. 4 and a block diagram is shown in the window in thelower left hand portion of FIG. 4. In the case of instrumentationcontrol applications, the user interface panel is typically referred toas an instrument front panel, or front panel. The objects in the userinterface panel include controls and indicators. Controls are used toreceive input, typically from a user, and to provide the input data tothe block diagram. Indicators are used to receive output data from theblock diagram and display the output data to the user. Examples ofindicators are graphs, thermometers, meters and gauges. Examples ofcontrols are slides, knobs, switches, buttons and dials. In oneembodiment, the controls and indicators include clusters of controls andindicators arranged in a hierarchical manner.

Preferably, the user interface panel comprises a directed acyclic graphof objects. In particular, the user interface panel comprises ahierarchical tree structure wherein the nodes of the tree are the userinterface panel objects. A graph may be defined as a finite non-emptyset of vertices and a set of edges such that every edge connects exactlytwo vertices. Preferably, any two vertices may be connected by zero ormore edges. In the user interface panel, the vertices are the controland indicator objects and the edges are the hierarchical relationshipbetween the objects. The direction of the edges are determined by thelevel in the hierarchy. That is, the direction is from higher levelobjects to lower level objects. The connectivity of an object is relatedto the other objects to which it is connected, i.e., its neighboringobjects, and the edges by which it is connected to its neighboringobjects.

The block diagram is the portion of the graphical program which includesthe graphical code to perform the calculations and operations of thegraphical program application. The objects in the block diagram includeterminals associated with the front panel controls and indicators. Thefront panel terminals are used to input and output data between thefront panel controls/indicators and the function blocks of the blockdiagram. The block diagram objects also include function nodes, such asmathematical operators; code execution structures such as for loops,while loops, case statements, and variable references; string functions;file I/O nodes; communication nodes; instrument I/O nodes; and dataacquisition nodes, for example. Preferably, the block diagram nodes areconnected by data paths, or signals, which determine the flow of datathrough the block diagram.

In the preferred embodiment, the block diagram comprises a data flowdiagram arranged as a directed acyclic graph. The vertices of the graphare the terminals and nodes of the block diagram. The edges of the graphare data path signals which connect the nodes and terminals. The nodesthemselves comprise one or more terminals which are connected to theedges. The direction of the edges of the graph is determined by thenodes themselves. For example, if a signal is connected between anoutput terminal of a first node and an input terminal of a second node,then the direction of data flow on that edge is from the output terminalto the input terminal.

As indicated in 602, in response to receiving the two graphicalprograms, diff may create a data structure representing the first blockdiagram, a data structure representing the second block diagram, a datastructure representing the first user interface panel, and a datastructure representing the second user interface panel. Preferably, thedata structures comprise directed graphs, and more particularly,directed acyclic graphs. The graphs are used by diff to determinedifferences between the block diagrams and user interface panels of thetwo graphical programs. Method element 602 and the graph structure isdiscussed in more detail in U.S. Pat. No. 5,974,254, which wasincorporated by reference above.

In 604, diff may then match objects in the first graphical program withobjects in the second graphical program. Objects are matched accordingto one or more criteria, such as object type, connectivity, attributesand position. Preferably, the matching is performed by calculating aweighted score which indicates a degree of matching or similaritybetween an object in the first graphical program and an object in thesecond graphical program according to the one or more criteria toproduce matching information. The matching information is used to groupthe objects into matching subgroups, or sub-graphs, and non-matchingsub-graphs for the purpose of determining differences between the twographical programs. The matching of objects performed in method element604 is described in more detail in U.S. Pat. No. 5,974,254, which wasincorporated by reference above.

Diff may then determine differences between the first graphical programand the second graphical program, as shown in method elements 606, 608and 610. Differences are determined for the block diagrams, the userinterface panels and/or the attributes of the first and second graphicalprograms. The determining of differences may include comparing objectsfound to match in method element 604 to determine any differencesbetween the matching objects. The determining of differences may alsoinclude determining objects in the first graphical program which have nomatch, i.e., which do not exist in the second graphical program. Thedifferences may be functional differences or cosmetic differences. Afunctional difference is one that may potentially affect the executionof the graphical program. Cosmetic differences are differences that donot affect execution of the graphical program. If the same set of inputsto a graphical program produce the same set of outputs even though achange has been made, that difference is a cosmetic difference ratherthan a functional difference. The determining of differences in theblock diagrams and user interface panels performed in method elements606 and 608, respectively, is described in more detail in U.S. Pat. No.5,974,254, which was incorporated by reference above.

Preferably, the graphical program also includes attributes. Examples ofgraphical program attributes include an icon and connector representingthe virtual instrument; attributes related to execution of the graphicalprogram, such as execution priority and whether or not to run thegraphical program upon being loaded; attributes related to the visualpresentation of the graphical program, such as whether or not to displaytoolbars and window scroll bars; documentation-related attributes;attributes relating the history of the graphical program; and selectionof a run-time menu. Diff detects differences between the attributes ofthe two graphical programs, as indicated in method element 610.

In 612, once diff determines the differences between the two graphicalprograms, diff may display an indication of the differences on thedisplay screen of the computer system 82. In one embodiment, diffhighlights differences by drawing a geometric symbol, such as an ellipseor circle, around the differences, as shown in FIG. 9A. FIG. 9A showstwo versions of a virtual instrument named “Calculate Num Iterations”and “Calculate Num Iterations2”. The block diagrams of the two graphicalprograms are displayed side by side in FIG. 9A. One of the differencesbetween the two graphical programs is shown in FIG. 9A. The differenceis related to a constant node which is connected as an input to a Selectnode. The block diagram on the left has a constant node with a valueattribute of 10, whereas, the block diagram on the right has a constantnode with a value attribute of 1. FIG. 9A shows the constant node ineach block diagram with an ellipse drawn around them to highlight thedifference. It is noted that the portions of the block diagram which arenot part of the currently selected difference are “grayed out” so thatthe difference may be visually highlighted for the user.

In operation of one embodiment, diff also displays the differences in adistinguishing color. For example, a black rectangular background isdisplayed behind the constant node in the first block diagram for afirst period of time (such as two seconds), and then a black rectangularbackground is displayed behind the constant node in the second blockdiagram for a similar period of time. This highlights the difference forthe user so that the user can visually distinguish the difference.

In operation of another embodiment, diff surrounds the differences with“marching ants”. Marching ants refers to the visual movement ofalternating colors, such as black and white, around a differing objectin each of the graphical programs. This operation may be partially seenin FIG. 9A by virtue of the fact that the constant node and the Selectnode are circumscribed with an alternating black and white portion thickline. Likewise, the wire connecting the two nodes is highlighted in asimilar manner. In operation, the alternating black and white portions“move” visually around the nodes and along the wire to highlight thedifference.

As noted above, displaying the differences may also include displaying atext description of the differences. For example, FIG. 9B shows a“Differences” window at the bottom portion of the screen. The leftportion 302 of the Differences window lists five differences between thetwo block diagrams shown. The right portion 304 of the Differenceswindow provides a more detailed textual description of the differencehighlighted in the left portion and which is currently displayed in theblock diagrams, namely, a numeric constant data value. In FIG. 9B, thetext description reads “Numeric Constant: data value” to indicate thatthere is a difference between the value of 10 and the value of 1 in thetwo constant nodes highlighted.

Preferably, differences may be determined in the block diagram, frontpanel and/or graphical program attributes individually or in anycombination thereof, rather than determining the differences in allthree.

It should be noted that the “diff” process described above withreference to FIG. 6 is meant to be exemplary only, and is not intendedto limit the present invention to any particular difference algorithm,functionality, or appearance.

FIG. 7—The Merge Process

FIG. 7 is a more detailed flowchart of method element 506 of FIG. 5,according to one embodiment. As noted above, in various embodiments,some of the method elements shown may be performed concurrently, in adifferent order than shown, or may be omitted. Additional methodelements may also be performed as desired.

In the embodiment described below, it is assumed that a diff operationhas already been performed on two graphical programs, e.g., first andsecond graphical programs, such as those described above with referenceto FIG. 6. More specifically, in the embodiment described below, eachgraphical program is referred to as or represented by a respectivegraph, and each determined difference is represented by a respectivepair of sub-graphs (e.g., graphical sub-programs), e.g., a firstsub-graph, referred to below as sub-graph A, including one or more nodesand zero or more edges in the first graph (i.e., the first graphicalprogram), and a respective second sub-graph, referred to below assub-graph B, comprising one or more nodes and zero or more edges in thesecond graph (i.e., the second graphical program).

In other words, each difference between the two graphical programs mayinclude or be represented by a respective sub-graph A in the firstgraphical program and a respective sub-graph B in the second graphicalprogram, where sub-graphs A and B are different. Sub-graphs A and B maycomprise or represent corresponding differences between the first andsecond graphical program, and may be determined based on anchorelements, e.g., anchor nodes, where anchor nodes are program nodes inthe first graphical program that have an exact match in the secondgraphical program (or vice versa), e.g., as determined by the matchingalgorithm or heuristic used by the graphical differencing system. Notethat the techniques described herein are broadly applicable to otherprogram elements, as well, e.g., information or code associated withnodes, connections, or any other aspects of the program. Thus, dependingon the difference/match criteria, embodiments of the approach describedmay utilize other types of anchor elements than nodes, or, consideredanother way, the graph nodes may represent other aspects of thegraphical program instead of graphical program nodes.

Thus, in preferred embodiments, the graphical differencing describedabove preferably produces a collection of one or more graphicaldifferences, e.g., a collection of sub-graph A/B pairs. The methodembodiment described below is specifically directed to merging thedifference in sub-graph A from the first graphical program intosub-graph B from the second graphical program, although it should benoted that the same process can be used to merge sub-graph B intosub-graph A. Thus, in one embodiment, the final merged graphical programmay thus include all the merged sub-graphs, in addition to the anchornodes. Of course, as noted above, in other embodiments, two mergedgraphical programs may be generated that collectively include all themerged sub-graphs, but which may differ as to which graphical programincludes which merged sub-graphs. Note that while the operationsdescribed herein refer to the first and second programs, it should benoted that if the original graphical programs are to be preserved, theoperations may be performed on copies of the graphical programs. Asshown, this method may operate as follows:

In 700, information regarding differences and matches between first andsecond graphical programs may be received, e.g., from a graphicaldifferencing process, such as that described above with reference toFIG. 6. While in various embodiments, this information describing orspecifying the differences may take any of a variety of forms, inpreferred embodiments, the information comprises a set of sub-graphs (ora specification or description thereof), where, as described above, eachdifference between the two graphical programs has or is described by anassociated pair of sub-graphs, A and B. Note that in some cases, e.g.,when one graphical program has an element that is omitted from theother, one of the sub-graphs may be empty, i.e., may be a nullsub-graph. Once the information regarding the matches and differences isreceived, the method may process or analyze each difference, asdescribed below.

In 702, for a current difference, all non-anchor nodes in sub-graph Band edges connected to these nodes may be deleted from the secondgraphical program.

In 704, all non-anchor nodes from sub-graph A and edges connected tothese nodes may be added to the second graphical program.

In various embodiments, program elements, e.g., nodes and edges (wires)may be added to the graphical program in different ways. For example,due to the graphical nature of the programs, space (e.g., in the blockdiagram) may need to be provided for the added elements. In oneapproach, bounds circumscribing the program elements, e.g., boundingboxes, convex hulls, or functional equivalents thereof, may bedetermined, where the bounds define a space wherein the elements may beplaced, e.g., in a graphical program. In one embodiment, the bounds maycomprise rectangles, although other shapes may be used as desired, e.g.,convex hulls or variants thereof, closed curves, aggregations ofrectangles and/or other shapes, and so forth.

Thus, in one embodiment, a bounding rectangle for all non-anchor nodesin sub-graph A may be determined. The resulting rectangle may bereferred to as R1. Similarly, a bounding rectangle for all non-anchornodes in sub-graph B may be determined, where the resulting rectanglemay be referred to as R2. A third rectangle, referred to as R3, may bedetermined based on the differences between R2 and R3.

For example, if the area of R1 is greater than R2, space in the secondgraphical program may be created (or added) by increasing thecoordinates (x,y) of all objects (e.g., program elements) to the rightand below R2 by the respective differences in width and height of R1 andR2.

If the area of R1 is less than R2, then space in the second graphicalprogram may be reduced by decreasing the coordinates (x,y) of allobjects to the right and below R2 by the respective differences in widthand height of R1 and R2.

In other words, an offset (increase or reduction) may be determined thatreflects the difference in size of R1 and R2. The modified (increased orreduced) space corresponds to R3. Thus, the new rectangle R3 may bedetermined by modifying the width and height of R1 by the determinedoffset (size difference) of R2. In some embodiments, the non-anchornodes of 704 may thus be placed into R3 with their relative positionspreserved, where R3 represents or specifies the “insertion space” forthe merged sub-graph in the second graphical program.

In 706, all edges in sub-graph A that connect anchor nodes to non-anchornodes may be enumerated. Said another way, the method may determine allthe edges or wires that connect the nodes or elements common to bothprograms (the anchor nodes) to the non-anchor nodes in sub-graph A.

In 708, for each edge enumerated in 706, a corresponding edge thatconnects a corresponding anchor node in sub-graph B with a correspondingnon-anchor node merged from sub-graph A may be added to the secondgraphical program. In other words, the added nodes may be connected tothe non-anchor nodes of the second program, thereby integrating themerged sub-graph A into the second graphical program.

As indicated in 710, if there are further differences, the method mayreturn to 702 and proceed as described above, with the next differenceas current. If there are no more differences, the method may terminate,as shown in FIG. 7.

As noted above, in some embodiments, the merge process described abovemay be at least partially directed by user input. For example, in oneembodiment, the user may specify, e.g., on a per difference basis, whichof the graphical programs (or, for example, an entirely new graphicalprogram) will receive the merged sub-graph. In other words, for eachdifference, the user may specify which of the graphical programs is themerge target. This approach may be particularly suited for situationswhere multiple versions of an application are developed and/ormaintained concurrently, and have very similar yet non-identicalfunctionality.

Thus, various embodiments of the merge process described above may beused to generate a merged graphical program.

Although the embodiments above have been described in considerabledetail, numerous variations and modifications will become apparent tothose skilled in the art once the above disclosure is fully appreciated.It is intended that the following claims be interpreted to embrace allsuch variations and modifications.

1. A computer-implemented method for merging graphical programs, themethod comprising: utilizing a computer to perform: receivinginformation regarding a first graphical program and a second graphicalprogram, wherein the first graphical program comprises a first pluralityof interconnected nodes that visually indicate functionality of thefirst graphical program, and wherein the second graphical programcomprises a second plurality of interconnected nodes that visuallyindicate functionality of the second graphical program; analyzing theinformation to determine matches and differences between the firstgraphical program and the second graphical program; automaticallymerging the first graphical program and the second graphical programbased on the determined matches and differences, thereby generating amerged graphical program, wherein said automatically merging isperformed without user input specifying nodes to be included in themerged graphical program; and displaying the merged graphical program ona display device.
 2. The method of claim 1, wherein said automaticallymerging is performed without user input specifying connections betweenthe nodes in the merged graphical program.
 3. The method of claim 1,wherein the first and second graphical programs comprise respectivefirst and second graphs, wherein each determined difference comprises arespective first sub-graph comprising one or more nodes and zero or moreedges in the first graph, and a respective second sub-graph comprisingone or more nodes and zero or more edges in the second graph, whereinnodes common to the first and second graphical programs comprise anchornodes, and wherein said automatically merging the first graphicalprogram and the second graphical program based on the determined matchesand differences comprises: for each determined difference: removing allnon-anchor nodes and connections thereto in the second sub-graph fromthe second graphical program; adding all non-anchor nodes andconnections thereto in the first sub-graph to the second graphicalprogram; determining all edges in the first sub-graph that connectanchor nodes to non-anchor nodes; and for each determined edge, addingto the second graphical program an edge that connects a correspondinganchor node in the second sub-graph with a corresponding non-anchor nodeadded from the first sub-graph.
 4. The method of claim 3, wherein thefirst and second graphical programs comprise respective first and secondgraphs, wherein each determined difference comprises a respective firstsub-graph comprising one or more nodes and zero or more edges in thefirst graph, and a respective second sub-graph comprising one or morenodes and zero or more edges in the second graph, wherein nodes commonto the first and second graphical programs comprise anchor nodes, andwherein said automatically merging the first graphical program and thesecond graphical program based on the determined matches and differencescomprises: for each determined difference: receiving user inputspecifying one of the first and second graphical programs as a targetgraphical program, thereby specifying a corresponding one of the firstand second sub-graphs as a target sub-graph and the other of the firstand second sub-graphs as a source sub-graph; removing all non-anchornodes and connections thereto in the target sub-graph from the targetgraphical program; adding all non-anchor nodes and connections theretoin the source sub-graph to the target graphical program; determining alledges in the source sub-graph that connect anchor nodes to non-anchornodes; and for each determined edge, adding to the target graphicalprogram an edge that connects a corresponding anchor node in the targetsub-graph with a corresponding non-anchor node added from the sourcesub-graph.
 5. The method of claim 1, wherein said displaying comprisesgraphically indicating the matches and differences between the first andsecond graphical programs in the merged graphical program.
 6. The methodof claim 4, wherein said graphically indicating the matches anddifferences between the first and second graphical programs in themerged graphical program comprises one or more of: highlighting thedifferences between the first and second graphical programs in themerged graphical program; displaying the matches and differences betweenthe first and second graphical programs in the merged graphical programusing a plurality of colors; indicating the matches and differencesbetween the first and second graphical programs in the merged graphicalprogram using a plurality of line styles; or indicating the matches anddifferences between the first and second graphical programs in themerged graphical program via moving dashed lines.
 7. The method of claim1, wherein said generating the merged graphical program comprises one ormore of: modifying the first graphical program to generate the mergedgraphical program; modifying the second graphical program to generatethe merged graphical program; or creating a new graphical programcomprising at least a partial union of the first and second graphicalprograms.
 8. The method of claim 1, wherein the merged graphical programcomprises a first merged graphical program, and wherein said generatingthe merged graphical program comprises generating the first mergedgraphical program and a second merged graphical program, comprising oneor more of: modifying the first and second graphical programs togenerate the first and second merged graphical programs, respectively;or creating the first and second merged graphical programs as newgraphical programs.
 9. The method of claim 1, wherein the matches anddifferences between the first graphical program and the second graphicalprogram comprise matches and differences between one or more of: nodescomprised in the first and second graphical programs; deployment ofnodes in the first and second graphical programs; implementation codecomprised in the first and second graphical programs; configuration datacomprised in the first and second graphical programs; or hardwaredevices associated with nodes comprised in the first and secondgraphical programs.
 10. The method of claim 9, wherein the hardwaredevices associated with nodes comprised in the first and secondgraphical programs comprise target devices for deployment of the nodes.11. The method of claim 9, wherein said matches and differences betweennodes comprised in the first and second graphical programs comprisematches and differences in one or more of: number and types of thenodes; versions of the nodes; configuration of the nodes, source code ofthe nodes; sub-nodes of the nodes; or deployment of the nodes.
 12. Themethod of claim 1, wherein the matches and differences between the firstgraphical program and the second graphical program further comprise:matches and differences in interconnectivity of nodes comprised in thefirst and second graphical programs.
 13. The method of claim 12, whereinsaid matches and differences in interconnectivity of nodes comprised inthe first and second graphical programs comprise matches and differencesin one or more of: data flow between nodes; signal flow between nodes;control flow between nodes; dependencies between nodes; callingrelationships between nodes; or physical connectivity between hardwaredevices associated with nodes.
 14. The method of claim 1, wherein theinformation regarding the first and second graphical programs comprisesone or more of: the first or second graphical programs; a graph of thefirst or second graphical programs; a description of the first or secondgraphical programs; or a data structure specifying the first or secondgraphical programs.
 15. The method of claim 1, wherein said displayingthe merged graphical program further comprises: displaying a textualdescription of matches and differences between the first and secondgraphical programs.
 16. The method of claim 1, wherein said analyzingthe information to determine matches and differences between the firstgraphical program and the second graphical program comprises: traversingthe first and second graphical programs to determine matches anddifferences between the first graphical program and the second graphicalprogram.
 17. The method of claim 1, wherein said analyzing comprises:creating one or more data structures which include information regardingsaid first plurality of interconnected nodes in the first graphicalprogram and the second plurality of interconnected nodes in the secondgraphical program; and comparing the one or more data structures todetermine the matches and differences.
 18. The method of claim 17,wherein the one or more data structures each comprise directed graphscomprising a plurality of vertices connected by edges, wherein each ofthe vertices represents one of the nodes in a respective one of thefirst and second graphical programs.
 19. The method of claim 1, whereinsaid analyzing the first and second information to determine differencesor matches between the first and second graphical programs is performedin accordance with specified difference or match criteria.
 20. Themethod of claim 19, wherein specified difference or match criteriacomprise one or more of: tolerance; category; cost; or performance. 21.The method of claim 19, further comprising: utilizing the computer toperform: receiving user input specifying the difference or matchcriteria.
 22. The method of claim 21, wherein the user input specifyingthe difference or match criteria comprises user input specifyingrespective portions of the graphical programs for analysis; and whereinsaid analyzing and said automatically merging are performed with respectto the specified portions of the graphical programs.
 23. The method ofclaim 22, further comprising: utilizing the computer to perform:receiving user input initiating said analyzing and said automaticallymerging, wherein said analyzing and said automatically merging areperformed in response to said initiating.
 24. The method of claim 23,further comprising: utilizing the computer to perform: storingdifference or merge information for each of a plurality of actionsperformed by the user or by the method; and receiving user inputinvoking one or more undo operations based on the stored difference ormerge information, wherein the one or more undo operations correspondrespectively to one or more of the plurality of actions.
 25. The methodof claim 24, further comprising: utilizing the computer to perform:receiving user input invoking one or more redo operations based on thestored difference or merge information, wherein the one or more redooperations correspond respectively to one or more of the one or moreundo operations.
 26. The method of claim 1, wherein the determineddifferences comprise one or more components represented in the firstgraphical program but missing from the second graphical program, themethod further comprising: searching for the one or more componentsbased on the determined differences, wherein the one or more componentsare operable to be included in the second graphical program.
 27. Themethod of claim 26, further comprising: utilizing the computer toperform: indicating the one or more components on the display device.28. The method of claim 26, further comprising: utilizing the computerto perform: initiating acquisition of the one or more components. 29.The method of claim 28, further comprising: utilizing the computer toperform: receiving payment information for purchase of the one or morecomponents.
 30. The method of claim 28, wherein said initiatingacquisition of the one or more components is performed: automatically;or in response to user input requesting purchase of the one or morecomponents.
 31. The method of claim 28, further comprising: utilizingthe computer to perform: downloading one or more software components toa client computer system for deployment to the second graphical program.32. The method of claim 31, further comprising: utilizing the computerto perform: automatically deploying the one or more software componentsto the second graphical program.
 33. The method of claim 28, furthercomprising: utilizing the computer to perform: automatically arrangingdelivery of the one or more components for inclusion in the secondgraphical program.
 34. The method of claim 1, further comprising:utilizing the computer to perform: receiving user input specifying thegeneration of the merged graphical program.
 35. The method of claim 1,wherein the first graphical program and the second graphical programeach comprises one or more of: an industrial automation system; aprocess control system; or a test and measurement system.
 36. Anon-transitory computer-accessible memory medium storing programinstructions for merging graphical programs, wherein the programinstructions are executable by a processor to perform: receivinginformation regarding a first graphical program and a second graphicalprogram, wherein the first graphical program comprises a first pluralityof interconnected nodes that visually indicate functionality of thefirst graphical program, and wherein the second graphical programcomprises a second plurality of interconnected nodes that visuallyindicate functionality of the second graphical program; analyzing theinformation to determine matches and differences between the firstgraphical program and the second graphical program; automaticallymerging the first graphical program and the second graphical programbased on the determined matches and differences, thereby generating amerged graphical program, wherein said automatically merging isperformed without user input specifying nodes to be included in themerged graphical program; and displaying the merged graphical program ona display device.
 37. The non-transitory computer-accessible memorymedium of claim 36, wherein said automatically merging is furtherperformed without user input specifying connections between the nodes inthe merged graphical program.
 38. The non-transitory computer-accessiblememory medium of claim 36, wherein the first and second graphicalprograms comprise respective first and second graphs, wherein eachdetermined difference comprises a respective first sub-graph comprisingone or more nodes and zero or more edges in the first graph, and arespective second sub-graph comprising one or more nodes and zero ormore edges in the second graph, wherein nodes common to the first andsecond graphical programs comprise anchor nodes, and wherein saidautomatically merging the first graphical program and the secondgraphical program based on the determined matches and differencescomprises: for each determined difference: removing all non-anchor nodesand connections thereto in the second sub-graph from the secondgraphical program; adding all non-anchor nodes and connections theretoin the first sub-graph to the second graphical program; determining alledges in the first sub-graph that connect anchor nodes to non-anchornodes; and for each determined edge, adding to the second graphicalprogram an edge that connects a corresponding anchor node in the secondsub-graph with a corresponding non-anchor node added from the firstsub-graph.
 39. The non-transitory computer-accessible memory medium ofclaim 36, wherein the first and second graphical programs compriserespective first and second graphs, wherein each determined differencecomprises a respective first sub-graph comprising one or more nodes andzero or more edges in the first graph, and a respective second sub-graphcomprising one or more nodes and zero or more edges in the second graph,wherein nodes common to the first and second graphical programs compriseanchor nodes, and wherein said automatically merging the first graphicalprogram and the second graphical program based on the determined matchesand differences comprises: for each determined difference: receivinguser input specifying one of the first and second graphical programs asa target graphical program, thereby specifying a corresponding one ofthe first and second sub-graphs as a target sub-graph and the other ofthe first and second sub-graphs as a source sub-graph; removing allnon-anchor nodes and connections thereto in the target sub-graph fromthe target graphical program; adding all non-anchor nodes andconnections thereto in the source sub-graph to the target graphicalprogram; determining all edges in the source sub-graph that connectanchor nodes to non-anchor nodes; and for each determined edge, addingto the target graphical program an edge that connects a correspondinganchor node in the target sub-graph with a corresponding non-anchor nodeadded from the source sub-graph.
 40. The non-transitorycomputer-accessible memory medium of claim 36, wherein said displayingcomprises graphically indicating the matches and differences between thefirst and second graphical programs in the merged graphical program. 41.The non-transitory computer-accessible memory medium of claim 40,wherein said graphically indicating the matches and differences betweenthe first and second graphical programs in the merged graphical programcomprises one or more of: highlighting the differences between the firstand second graphical programs in the merged graphical program;displaying the matches and differences between the first and secondgraphical programs in the merged graphical program using a plurality ofcolors; indicating the matches and differences between the first andsecond graphical programs in the merged graphical program using aplurality of line styles; or indicating the matches and differencesbetween the first and second graphical programs in the merged graphicalprogram via moving dashed lines.
 42. The non-transitorycomputer-accessible memory medium of claim 36, wherein said generatingthe merged graphical program comprises one or more of: modifying thefirst graphical program to generate the merged graphical program;modifying the second graphical program to generate the merged graphicalprogram; or creating a new graphical program comprising at least apartial union of the first and second graphical programs.
 43. Thenon-transitory computer-accessible memory medium of claim 36, whereinthe merged graphical program comprises a first merged graphical program,and wherein said generating the merged graphical program comprisesgenerating the first merged graphical program and a second mergedgraphical program, comprising one or more of: modifying the first andsecond graphical programs to generate the first and second mergedgraphical programs, respectively; or creating the first and secondmerged graphical programs as new graphical programs.
 44. Thenon-transitory computer-accessible memory medium of claim 36, whereinthe matches and differences between the first graphical program and thesecond graphical program comprise matches and differences between one ormore of: nodes comprised in the first and second graphical programs;deployment of nodes in the first and second graphical programs;implementation code comprised in the first and second graphicalprograms; configuration data comprised in the first and second graphicalprograms; or hardware devices associated with nodes comprised in thefirst and second graphical programs.
 45. The non-transitorycomputer-accessible memory medium of claim 44, wherein the hardwaredevices associated with nodes comprised in the first and secondgraphical programs comprise target devices for deployment of the nodes.46. The non-transitory computer-accessible memory medium of claim 44,wherein said matches and differences between nodes comprised in thefirst and second graphical programs comprise matches and differences inone or more of: number and types of the nodes; versions of the nodes;configuration of the nodes; source code of the nodes; sub-nodes of thenodes; or deployment of the nodes.
 47. The non-transitorycomputer-accessible memory medium of claim 36, wherein the matches anddifferences between the first graphical program and the second graphicalprogram further comprise: matches and differences in interconnectivityof nodes comprised in the first and second graphical programs.
 48. Thenon-transitory computer-accessible memory medium of claim 47, whereinsaid matches and differences in interconnectivity of nodes comprised inthe first and second graphical programs comprise matches and differencesin one or more of: data flow between nodes; signal flow between nodes;control flow between nodes; dependencies between nodes; callingrelationships between nodes; or physical connectivity between hardwaredevices associated with nodes.
 49. The non-transitorycomputer-accessible memory medium of claim 36, wherein the informationregarding the first and second graphical programs comprises one or moreof: the first or second graphical programs; a graph of the first orsecond graphical programs; a description of the first or secondgraphical programs; or a data structure specifying the first or secondgraphical programs.
 50. The non-transitory computer-accessible memorymedium of claim 36, wherein said displaying the merged graphical programfurther comprises: displaying a textual description of matches anddifferences between the first and second graphical programs.
 51. Thenon-transitory computer-accessible memory medium of claim 36, whereinsaid analyzing the information to determine matches and differencesbetween the first graphical program and the second graphical programcomprises: traversing the first and second graphical programs todetermine matches and differences between the first graphical programand the second graphical program.
 52. The non-transitorycomputer-accessible memory medium of claim 36, wherein said analyzingcomprises: creating one or more data structures which includeinformation regarding said first plurality of interconnected nodes inthe first graphical program and the second plurality of interconnectednodes in the second graphical program; and comparing the one or moredata structures to determine the matches and differences.
 53. Thenon-transitory computer-accessible memory medium of claim 52, whereinthe one or more data structures each comprise directed graphs comprisinga plurality of vertices connected by edges, wherein each of the verticesrepresents one of the nodes in a respective one of the first and secondgraphical programs.
 54. The non-transitory computer-accessible memorymedium of claim 36, wherein said analyzing the first and secondinformation to determine differences or matches between the first andsecond graphical programs is performed in accordance with specifieddifference or match criteria.
 55. The non-transitory computer-accessiblememory medium of claim 54, wherein specified difference or matchcriteria comprise one or more of: tolerance; category; cost; orperformance.
 56. The non-transitory computer-accessible memory medium ofclaim 54, wherein the program instructions are further executable toperform: receiving user input specifying the difference or matchcriteria.
 57. The non-transitory computer-accessible memory medium ofclaim 56, wherein the user input specifying the difference or matchcriteria comprises user input specifying respective portions of thegraphical programs for analysis; and wherein said analyzing and saidautomatically merging are performed with respect to the specifiedportions of the graphical programs.
 58. The non-transitorycomputer-accessible memory medium of claim 57, wherein the programinstructions are further executable to perform: receiving user inputinitiating said analyzing and said automatically merging, wherein saidanalyzing and said automatically merging are performed in response tosaid initiating.
 59. The non-transitory computer-accessible memorymedium of claim 58, wherein the program instructions are furtherexecutable to perform: storing difference or merge information for eachof a plurality of actions performed by the user or by the method; andreceiving user input invoking one or more undo operations based on thestored difference or merge information, wherein the one or more undooperations correspond respectively to one or more of the plurality ofactions.
 60. The non-transitory computer-accessible memory medium ofclaim 59, wherein the program instructions are further executable toperform: receiving user input invoking one or more redo operations basedon the stored difference or merge information, wherein the one or moreredo operations correspond respectively to one or more of the one ormore undo operations.
 61. The non-transitory computer-accessible memorymedium of claim 36, wherein the determined differences comprise one ormore components represented in the first graphical program but missingfrom the second graphical program, and wherein the program instructionsare further executable to perform: searching for the one or morecomponents based on the determined differences, wherein the one or morecomponents are operable to be included in the second graphical program.62. The non-transitory computer-accessible memory medium of claim 61,wherein the program instructions are further executable to perform:indicating the one or more components on the display device.
 63. Thenon-transitory computer-accessible memory medium of claim 61, whereinthe program instructions are further executable to perform: initiatingacquisition of the one or more components.
 64. The non-transitorycomputer-accessible memory medium of claim 63, wherein the programinstructions are further executable to perform: receiving paymentinformation for purchase of the one or more components.
 65. Thenon-transitory computer-accessible memory medium of claim 63, whereinsaid initiating acquisition of the one or more components is performed:automatically; or in response to user input requesting purchase of theone or more components.
 66. The non-transitory computer-accessiblememory medium of claim 63, wherein the program instructions are furtherexecutable to perform: downloading one or more software components to aclient computer system for deployment to the second graphical program.67. The non-transitory computer-accessible memory medium of claim 66,wherein the program instructions are further executable to perform:automatically deploying the one or more software components to thesecond graphical program.
 68. The non-transitory computer-accessiblememory medium of claim 63, wherein the program instructions are furtherexecutable to perform: automatically arranging delivery of the one ormore components for inclusion in the second graphical program.
 69. Thenon-transitory computer-accessible memory medium of claim 36, whereinthe program instructions are further executable to perform: receivinguser input specifying the generation of the merged graphical program.70. The non-transitory computer-accessible memory medium of claim 36,wherein the first graphical program and the second graphical programeach comprises one or more of: an industrial automation system; aprocess control system; or a test and measurement system.
 71. A systemfor merging graphical programs, the system comprising: a processor; anda memory medium coupled to the processor; and a display device; whereinthe memory stores program instructions executable by the processor to:receive information regarding a first graphical program and a secondgraphical program, wherein the first graphical program comprises a firstplurality of interconnected nodes that visually indicate functionalityof the first graphical program, and wherein the second graphical programcomprises a second plurality of interconnected nodes that visuallyindicate functionality of the second graphical program; analyze theinformation to determine matches and differences between the firstgraphical program and the second graphical program; automatically mergethe first graphical program and the second graphical program based onthe determined matches and differences, thereby generating a mergedgraphical program, wherein said automatically merging is performedwithout user input specifying nodes to be included in the mergedgraphical program; and display the merged graphical program on a displaydevice.
 72. A system for merging graphical programs, the systemcomprising: means for receiving information regarding a first graphicalprogram and a second graphical program, wherein the first graphicalprogram comprises a first plurality of interconnected nodes thatvisually indicate functionality of the first graphical program, andposition information of the respective nodes in the first graphicalprogram, and wherein the second graphical program comprises a secondplurality of interconnected nodes that visually indicate functionalityof the second graphical program, and position information of therespective nodes in the second graphical program; means for analyzingthe information to determine matches and differences between the firstgraphical program and the second graphical program; means forautomatically merging the first graphical program and the secondgraphical program based on the determined matches and differences,thereby generating a merged graphical program, wherein saidautomatically merging is performed without user input specifying nodesto be included in the merged graphical program; and means for displayingthe merged graphical program on a display device.